]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: sr: add option to control lwtunnel support
authorDavid Lebrun <david.lebrun@uclouvain.be>
Tue, 15 Nov 2016 15:14:04 +0000 (16:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 16:29:46 +0000 (11:29 -0500)
commit594c93b68c397cf95b83456fc867e9df177a3571
tree1214e4bb3f6bf5ec5824ea6eb25825e0187b0f45
parentf7499edcfc81d3951fabe2a2bb4db86c8de7bd3d
ipv6: sr: add option to control lwtunnel support

This patch adds a new option CONFIG_IPV6_SEG6_LWTUNNEL to enable/disable
support of encapsulation with the lightweight tunnels. When this option
is enabled, CONFIG_LWTUNNEL is automatically selected.

Fix commit 7ab7a75aa79e ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels")

Without a proper option to control lwtunnel support for SR-IPv6, if
CONFIG_LWTUNNEL=n then the IPv6 initialization fails as a consequence
of seg6_iptunnel_init() failure with EOPNOTSUPP:

NET: Registered protocol family 10
IPv6: Attempt to unregister permanent protocol 6
IPv6: Attempt to unregister permanent protocol 136
IPv6: Attempt to unregister permanent protocol 17
NET: Unregistered protocol family 10

Tested (compiling, booting, and loading ipv6 module when relevant)
with possible combinations of CONFIG_IPV6={y,m,n},
CONFIG_IPV6_SEG6_LWTUNNEL={y,n} and CONFIG_LWTUNNEL={y,n}.

Reported-by: Lorenzo Colitti <lorenzo@google.com>
Suggested-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/Kconfig
net/ipv6/Makefile
net/ipv6/seg6.c