Re: [PATCH nf] netfilter: xt_TEE: fix build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 Nov 2018 at 02:15, Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
> On 11/18/18 6:39 AM, Taehee Yoo wrote:
> > xt_TEE.c needs nf_dup_ipv6.c to support ipv6 packet duplication.
> > So that if xt_TEE is enabled, nf_dup_ipv6 will be automatically selected.
> > But there is build failure scenario.
> >
> > test config:
> > CONFIG_NETFILTER_XT_TARGET_TEE=y
> > CONFIG_NF_DUP_IPV6=m
> >
> > compile result:
> > net/netfilter/xt_TEE.o: In function `tee_tg6':
> > net/netfilter/xt_TEE.c:57: undefined reference to `nf_dup_ipv6'
> >
> > This patch forces to avoid above config.
> >
> > Fixes: 5d400a4933e8 ("netfilter: Kconfig: Change select IPv6 dependencies")
> > Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> > Reported-by: Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> > Signed-off-by: Taehee Yoo <ap420073@xxxxxxxxx>
>
> Hi,

Hi!
Thank you for review!

> This does fix the build error, so
> Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>
> The patch causes this:
>   CONFIG_NF_DUP_IPV6=m
> to become this:
>   CONFIG_NF_DUP_IPV6=y
>
> I understand how the above change fixes the build error, but I don't
> see how the change to the Kconfig below file causes the resulting
> .config file change above.
>
> Do you?  Can you explain it?  Thanks.
>

My understanding is that:
   1. select NF_DUP_IPV6 if IP6_NF_IPTABLES
   2. select NF_DUP_IPV6 if IP6_NF_IPTABLES != n

First statement means that
NF_DUP_IPV6 can't be lower than IP6_NF_IPTABLES.
for example,
If NF_DUP_IPV6 is 'm', NF_DUP_IPV6 can be 'm' or 'y'.
If NF_DUP_IPV6 is 'y', NF_DUP_IPV6 can be only 'y'

Second statement means that
NF_DUP_IPV6 will be set the same value of NETFILTER_XT_TARGET_TEE
if IP6_NF_IPTABLES value is not 'n'.

My understanding might be wrong. If so, please let me know!

Thanks!


> > ---
> >  net/netfilter/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
> > index 2ab870ef233a..a0c2712290ea 100644
> > --- a/net/netfilter/Kconfig
> > +++ b/net/netfilter/Kconfig
> > @@ -1011,7 +1011,7 @@ config NETFILTER_XT_TARGET_TEE
> >       depends on IPV6 || IPV6=n
> >       depends on !NF_CONNTRACK || NF_CONNTRACK
> >       select NF_DUP_IPV4
> > -     select NF_DUP_IPV6 if IP6_NF_IPTABLES
> > +     select NF_DUP_IPV6 if IP6_NF_IPTABLES != n
> >       ---help---
> >       This option adds a "TEE" target with which a packet can be cloned and
> >       this clone be rerouted to another nexthop.
> >
>
>
> --
> ~Randy



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux