mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
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>
This commit is contained in:
parent
eea86af6b1
commit
c2ff682a6f
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user