kernel: add missing check for skb->dev on netfilter xfrm optimization patch

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43567
lede-17.01
Felix Fietkau 2014-12-08 12:21:17 +00:00
parent 14a163ca58
commit 0cebaafa6e
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
struct dst_entry *dst;
int err;
+ if (!dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
+ if (skb->dev && !dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
+ return 0;
+
err = xfrm_decode_session(skb, &fl, family);

View File

@ -4,7 +4,7 @@
struct dst_entry *dst;
int err;
+ if (!dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
+ if (skb->dev && !dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
+ return 0;
+
err = xfrm_decode_session(skb, &fl, family);

View File

@ -4,7 +4,7 @@
struct dst_entry *dst;
int err;
+ if (!dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
+ if (skb->dev && !dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
+ return 0;
+
err = xfrm_decode_session(skb, &fl, family);