summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2013-06-19 12:03:13 +0200
committerDavid S. Miller <davem@davemloft.net>2013-06-19 21:18:17 -0700
commitc2ff682a6f5c5ae2cb23b32bb4fd7a6fb059d4fc (patch)
tree802962ed34c3b2d5e6268e90c18cf9dbf50466bf /net/ipv6
parenteea86af6b1e18d6fa8dc959e3ddc0100f27aff9f (diff)
downloadblackbird-op-linux-c2ff682a6f5c5ae2cb23b32bb4fd7a6fb059d4fc.tar.gz
blackbird-op-linux-c2ff682a6f5c5ae2cb23b32bb4fd7a6fb059d4fc.zip
sit: fix an oops when IFLA_IPTUN_PROTO is not set
The use of this attribute has been added in 32b8a8e59c9c (sit: add IPv4 over IPv4 support). It is optional, by default proto is IPPROTO_IPV6. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/sit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 6cee844678e2..f639866b3dcf 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1296,7 +1296,7 @@ static int ipip6_validate(struct nlattr *tb[], struct nlattr *data[])
{
u8 proto;
- if (!data)
+ if (!data || !data[IFLA_IPTUN_PROTO])
return 0;
proto = nla_get_u8(data[IFLA_IPTUN_PROTO]);
OpenPOWER on IntegriCloud