diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-12-08 12:21:17 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-12-08 12:21:17 +0000 |
commit | e548c1c786c5b3606dd3ed059e9a86c3d59a449b (patch) | |
tree | 591ff7451ba948e735c021c8268a38dc499f0111 /target/linux/generic | |
parent | 92aa98df3321c59f982819f085360625f00b5ec3 (diff) | |
download | upstream-e548c1c786c5b3606dd3ed059e9a86c3d59a449b.tar.gz upstream-e548c1c786c5b3606dd3ed059e9a86c3d59a449b.tar.bz2 upstream-e548c1c786c5b3606dd3ed059e9a86c3d59a449b.zip |
kernel: add missing check for skb->dev on netfilter xfrm optimization patch
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43567 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
3 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/generic/patches-3.10/616-net_optimize_xfrm_calls.patch b/target/linux/generic/patches-3.10/616-net_optimize_xfrm_calls.patch index 5724367c1f..1caf1ef59c 100644 --- a/target/linux/generic/patches-3.10/616-net_optimize_xfrm_calls.patch +++ b/target/linux/generic/patches-3.10/616-net_optimize_xfrm_calls.patch @@ -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); diff --git a/target/linux/generic/patches-3.14/616-net_optimize_xfrm_calls.patch b/target/linux/generic/patches-3.14/616-net_optimize_xfrm_calls.patch index a4e4157300..2a64d5420a 100644 --- a/target/linux/generic/patches-3.14/616-net_optimize_xfrm_calls.patch +++ b/target/linux/generic/patches-3.14/616-net_optimize_xfrm_calls.patch @@ -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); diff --git a/target/linux/generic/patches-3.18/616-net_optimize_xfrm_calls.patch b/target/linux/generic/patches-3.18/616-net_optimize_xfrm_calls.patch index a4e4157300..2a64d5420a 100644 --- a/target/linux/generic/patches-3.18/616-net_optimize_xfrm_calls.patch +++ b/target/linux/generic/patches-3.18/616-net_optimize_xfrm_calls.patch @@ -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); |