Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nicolas Dichtel and committed by
David S. Miller
c2ff682a eea86af6

+1 -1
+1 -1
net/ipv6/sit.c
··· 1296 1296 { 1297 1297 u8 proto; 1298 1298 1299 - if (!data) 1299 + if (!data || !data[IFLA_IPTUN_PROTO]) 1300 1300 return 0; 1301 1301 1302 1302 proto = nla_get_u8(data[IFLA_IPTUN_PROTO]);