projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eea86af
)
sit: fix an oops when IFLA_IPTUN_PROTO is not set
author
Nicolas Dichtel
<nicolas.dichtel@6wind.com>
Wed, 19 Jun 2013 10:03:13 +0000
(12:03 +0200)
committer
David S. Miller
<davem@davemloft.net>
Thu, 20 Jun 2013 04:18:17 +0000
(21:18 -0700)
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>
net/ipv6/sit.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/sit.c
b/net/ipv6/sit.c
index 6cee844678e2418c2fefc84ddbfd9c34584ea613..f639866b3dcfb51e3c0fc22e0298fd5cf1816f8e 100644
(file)
--- 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]);