2019-06-12 09:09:33

by Yue Haibing

[permalink] [raw]
Subject: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6

If CONFIG_IPV6 is not set, building fails:

net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'

Reported-by: Hulk Robot <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y")
Signed-off-by: YueHaibing <[email protected]>
---
include/linux/netfilter_ipv6.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index 3a3dc4b..0e1febc 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb,
return 1;

return v6_ops->br_defrag(net, skb, user);
-#else
+#endif
+#if IS_BUILTIN(CONFIG_IPV6)
return nf_ct_frag6_gather(net, skb, user);
+#else
+ return 1;
#endif
}

@@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk,
return 1;

return v6_ops->br_fragment(net, sk, skb, data, output);
-#else
+#endif
+#if IS_BUILTIN(CONFIG_IPV6)
return br_ip6_fragment(net, sk, skb, data, output);
+#else
+ return 1;
#endif
}

--
2.7.4



2019-06-20 15:26:30

by Yue Haibing

[permalink] [raw]
Subject: Re: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6

Friendly ping...

On 2019/6/12 16:47, YueHaibing wrote:
> If CONFIG_IPV6 is not set, building fails:
>
> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
> nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
> nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'
>
> Reported-by: Hulk Robot <[email protected]>
> Reported-by: Randy Dunlap <[email protected]>
> Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y")
> Signed-off-by: YueHaibing <[email protected]>
> ---
> include/linux/netfilter_ipv6.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
> index 3a3dc4b..0e1febc 100644
> --- a/include/linux/netfilter_ipv6.h
> +++ b/include/linux/netfilter_ipv6.h
> @@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb,
> return 1;
>
> return v6_ops->br_defrag(net, skb, user);
> -#else
> +#endif
> +#if IS_BUILTIN(CONFIG_IPV6)
> return nf_ct_frag6_gather(net, skb, user);
> +#else
> + return 1;
> #endif
> }
>
> @@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk,
> return 1;
>
> return v6_ops->br_fragment(net, sk, skb, data, output);
> -#else
> +#endif
> +#if IS_BUILTIN(CONFIG_IPV6)
> return br_ip6_fragment(net, sk, skb, data, output);
> +#else
> + return 1;
> #endif
> }
>
>

2019-06-20 15:51:36

by Pablo Neira Ayuso

[permalink] [raw]
Subject: Re: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6

On Thu, Jun 20, 2019 at 11:26:01PM +0800, Yuehaibing wrote:
> Friendly ping...
>
> On 2019/6/12 16:47, YueHaibing wrote:
> > If CONFIG_IPV6 is not set, building fails:
> >
> > net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
> > nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
> > net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
> > nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'

Is this one enough to fix this problem?

https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=16e6427c88c5b7e7b6612f6c286d5f71d659e5be

Thanks.

> > Reported-by: Hulk Robot <[email protected]>
> > Reported-by: Randy Dunlap <[email protected]>
> > Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y")
> > Signed-off-by: YueHaibing <[email protected]>
> > ---
> > include/linux/netfilter_ipv6.h | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
> > index 3a3dc4b..0e1febc 100644
> > --- a/include/linux/netfilter_ipv6.h
> > +++ b/include/linux/netfilter_ipv6.h
> > @@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb,
> > return 1;
> >
> > return v6_ops->br_defrag(net, skb, user);
> > -#else
> > +#endif
> > +#if IS_BUILTIN(CONFIG_IPV6)
> > return nf_ct_frag6_gather(net, skb, user);
> > +#else
> > + return 1;
> > #endif
> > }
> >
> > @@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk,
> > return 1;
> >
> > return v6_ops->br_fragment(net, sk, skb, data, output);
> > -#else
> > +#endif
> > +#if IS_BUILTIN(CONFIG_IPV6)
> > return br_ip6_fragment(net, sk, skb, data, output);
> > +#else
> > + return 1;
> > #endif
> > }
> >
> >
>

2019-06-21 02:06:15

by Yue Haibing

[permalink] [raw]
Subject: Re: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6

On 2019/6/20 23:50, Pablo Neira Ayuso wrote:
> On Thu, Jun 20, 2019 at 11:26:01PM +0800, Yuehaibing wrote:
>> Friendly ping...
>>
>> On 2019/6/12 16:47, YueHaibing wrote:
>>> If CONFIG_IPV6 is not set, building fails:
>>>
>>> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
>>> nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
>>> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
>>> nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'
>
> Is this one enough to fix this problem?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=16e6427c88c5b7e7b6612f6c286d5f71d659e5be

No, building the linux-next for 20190620 still fails with this patch

The randconfig attached.

>
> Thanks.
>
>>> Reported-by: Hulk Robot <[email protected]>
>>> Reported-by: Randy Dunlap <[email protected]>
>>> Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y")
>>> Signed-off-by: YueHaibing <[email protected]>
>>> ---
>>> include/linux/netfilter_ipv6.h | 10 ++++++++--
>>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
>>> index 3a3dc4b..0e1febc 100644
>>> --- a/include/linux/netfilter_ipv6.h
>>> +++ b/include/linux/netfilter_ipv6.h
>>> @@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb,
>>> return 1;
>>>
>>> return v6_ops->br_defrag(net, skb, user);
>>> -#else
>>> +#endif
>>> +#if IS_BUILTIN(CONFIG_IPV6)
>>> return nf_ct_frag6_gather(net, skb, user);
>>> +#else
>>> + return 1;
>>> #endif
>>> }
>>>
>>> @@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk,
>>> return 1;
>>>
>>> return v6_ops->br_fragment(net, sk, skb, data, output);
>>> -#else
>>> +#endif
>>> +#if IS_BUILTIN(CONFIG_IPV6)
>>> return br_ip6_fragment(net, sk, skb, data, output);
>>> +#else
>>> + return 1;
>>> #endif
>>> }
>>>
>>>
>>
>
> .
>


Attachments:
config (176.41 kB)

2019-06-21 15:17:07

by Pablo Neira Ayuso

[permalink] [raw]
Subject: Re: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6

On Wed, Jun 12, 2019 at 04:47:15PM +0800, YueHaibing wrote:
> If CONFIG_IPV6 is not set, building fails:
>
> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
> nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
> nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'

Applied, thanks for explaining.

2019-06-21 15:21:24

by Pablo Neira Ayuso

[permalink] [raw]
Subject: Re: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6

Actually, I'm going to take this one:

https://patchwork.ozlabs.org/patch/1117011/

which looks more complete.

Thanks a lot for reporting in any case.