OSDN Git Service

vxlan: correctly handle ipv6.disable module parameter
authorJiri Benc <jbenc@redhat.com>
Thu, 27 Apr 2017 19:24:35 +0000 (21:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:00:19 +0000 (11:00 +0100)
commit9c8cd2a87247a9561536345715ef63143551f0c9
tree56708648a0285435fdae620e4347c8afb8e29d41
parentb5d95e85b20634f58c2d57f4041222a9adefd282
vxlan: correctly handle ipv6.disable module parameter

[ Upstream commit d074bf9600443403aa24fbc12c1f18eadc90f5aa ]

When IPv6 is compiled but disabled at runtime, __vxlan_sock_add returns
-EAFNOSUPPORT. For metadata based tunnels, this causes failure of the whole
operation of bringing up the tunnel.

Ignore failure of IPv6 socket creation for metadata based tunnels caused by
IPv6 not being available.

Fixes: b1be00a6c39f ("vxlan: support both IPv4 and IPv6 sockets in a single vxlan device")
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vxlan.c