summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-08-28 20:48:22 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-29 13:07:54 -0700
commita43a9ef6a2e510fec61176ff2c34fab3e7d581da (patch)
tree388c9e94c26bdd40875562a58b84a54213ca7ac7 /include/net
parentb9b6695cf0e1afebc207e28c7e9350c90547a426 (diff)
downloadop-kernel-dev-a43a9ef6a2e510fec61176ff2c34fab3e7d581da.zip
op-kernel-dev-a43a9ef6a2e510fec61176ff2c34fab3e7d581da.tar.gz
vxlan: do not receive IPv4 packets on IPv6 socket
By default (subject to the sysctl settings), IPv6 sockets listen also for IPv4 traffic. Vxlan is not prepared for that and expects IPv6 header in packets received through an IPv6 socket. In addition, it's currently not possible to have both IPv4 and IPv6 vxlan tunnel on the same port (unless bindv6only sysctl is enabled), as it's not possible to create and bind both IPv4 and IPv6 vxlan interfaces and there's no way to specify both IPv4 and IPv6 remote/group IP addresses. Set IPV6_V6ONLY on vxlan sockets to fix both of these issues. This is not done globally in udp_tunnel, as l2tp and tipc seems to work okay when receiving IPv4 packets on IPv6 socket and people may rely on this behavior. The other tunnels (geneve and fou) do not support IPv6. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/udp_tunnel.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index 35041d0..cb2f89f 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -31,7 +31,8 @@ struct udp_port_cfg {
__be16 peer_udp_port;
unsigned int use_udp_checksums:1,
use_udp6_tx_checksums:1,
- use_udp6_rx_checksums:1;
+ use_udp6_rx_checksums:1,
+ ipv6_v6only:1;
};
int udp_sock_create4(struct net *net, struct udp_port_cfg *cfg,
OpenPOWER on IntegriCloud