kernel: add missing check for skb->dev on netfilter xfrm optimization patch
authorFelix Fietkau <nbd@openwrt.org>
Mon, 8 Dec 2014 12:21:17 +0000 (12:21 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 8 Dec 2014 12:21:17 +0000 (12:21 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43567 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic/patches-3.10/616-net_optimize_xfrm_calls.patch
target/linux/generic/patches-3.14/616-net_optimize_xfrm_calls.patch
target/linux/generic/patches-3.18/616-net_optimize_xfrm_calls.patch

index 5724367..1caf1ef 100644 (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);
index a4e4157..2a64d54 100644 (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);
index a4e4157..2a64d54 100644 (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);