Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359544
| From | Joe Stringer <joe@ovn.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [ovs-dev] [PATCH] openvswitch: call only into reachable nf-nat code |
| Date | 2016-03-17 04:20 +0100 |
| Message-ID | <rdwDE-1Dx-9@gated-at.bofh.it> (permalink) |
| References | <rdj3I-zc-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 17 March 2016 at 01:47, Arnd Bergmann <arnd@arndb.de> wrote:
> The openvswitch code has gained support for calling into the
> nf-nat-ipv4/ipv6 modules, however those can be loadable modules
> in a configuration in which openvswitch is built-in, leading
> to link errors:
>
> net/built-in.o: In function `__ovs_ct_lookup':
> :(.text+0x2cc2c8): undefined reference to `nf_nat_icmp_reply_translation'
> :(.text+0x2cc66c): undefined reference to `nf_nat_icmpv6_reply_translation'
>
> The dependency on (!NF_NAT || NF_NAT) was meant to prevent
> this, but NF_NAT is set to 'y' if any of the symbols selecting
> it are built-in, but the link error happens when any of them
> are modular.
>
> A second issue is that even if CONFIG_NF_NAT_IPV6 is built-in,
> CONFIG_NF_NAT_IPV4 might be completely disabled. This is unlikely
> to be useful in practice, but the driver currently only handles
> IPv6 being optional.
>
> This patch improves the Kconfig dependency so that openvswitch
> cannot be built-in if either of the two other symbols are set
> to 'm', and it replaces the incorrect #ifdef in ovs_ct_nat_execute()
> with two "if (IS_ENABLED())" checks that should catch all corner
> cases also make the code more readable.
>
> The same #ifdef exists ovs_ct_nat_to_attr(), where it does not
> cause a link error, but for consistency I'm changing it the same
> way.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 05752523e565 ("openvswitch: Interface with NAT.")
Thanks for the fix, LGTM.
Acked-by: Joe Stringer <joe@ovn.org>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] openvswitch: call only into reachable nf-nat code Arnd Bergmann <arnd@arndb.de> - 2016-03-16 13:50 +0100
Re: [PATCH] openvswitch: call only into reachable nf-nat code Pablo Neira Ayuso <pablo@netfilter.org> - 2016-03-16 14:30 +0100
Re: [PATCH] openvswitch: call only into reachable nf-nat code Arnd Bergmann <arnd@arndb.de> - 2016-03-16 15:00 +0100
Re: [ovs-dev] [PATCH] openvswitch: call only into reachable nf-nat code Joe Stringer <joe@ovn.org> - 2016-03-17 04:00 +0100
Re: [ovs-dev] [PATCH] openvswitch: call only into reachable nf-nat code Joe Stringer <joe@ovn.org> - 2016-03-17 04:20 +0100
Re: [PATCH] openvswitch: call only into reachable nf-nat code Arnd Bergmann <arnd@arndb.de> - 2016-03-18 14:00 +0100
csiph-web