summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-08-28 20:48:21 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-29 13:07:54 -0700
commitb9b6695cf0e1afebc207e28c7e9350c90547a426 (patch)
tree206cb09c12678bc8afeda31b02927bc1edb30124 /net/ipv4
parent7f9562a1f405306eacb97f95d78cb996e33f27f5 (diff)
downloadop-kernel-dev-b9b6695cf0e1afebc207e28c7e9350c90547a426.zip
op-kernel-dev-b9b6695cf0e1afebc207e28c7e9350c90547a426.tar.gz
fou: reject IPv6 config
fou does not really support IPv6 encapsulation. After an UDP socket is created in fou_create, the encap_rcv callback is set either to fou_udp_recv or to gue_udp_recv. Both of those unconditionally assume that the received packet has an IPv4 header and access the data at network_header as it was an IPv4 header. This leads to IPv6 flow label being interpreted as IP packet length, etc. Disallow fou tunnel to be configured as IPv6 until real IPv6 support is added to fou. CC: Tom Herbert <tom@herbertland.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fou.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index 2d1646c..e0fcbbb 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -566,7 +566,7 @@ static int parse_nl_config(struct genl_info *info,
if (info->attrs[FOU_ATTR_AF]) {
u8 family = nla_get_u8(info->attrs[FOU_ATTR_AF]);
- if (family != AF_INET && family != AF_INET6)
+ if (family != AF_INET)
return -EINVAL;
cfg->udp_config.family = family;
OpenPOWER on IntegriCloud