aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-04-27 23:12:34 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-27 23:12:34 -0400
commit39376ccb1968ba9f83e2a880a8bf02ad5dea44e1 (patch)
tree8f1299a1ac38bd64415482212a33510eb94b3f56 /include
parent876a7ae65b86d8cec8efe7d15d050ac61116874e (diff)
parent547c4b547e07dcc60874b6ef6252dd49ff74aec1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Fix a crash in nf_tables when dictionaries are used from the ruleset, due to memory corruption, from Florian Westphal. 2) Fix another crash in nf_queue when used with br_netfilter. Also from Florian. Both fixes are related to new stuff that got in 4.0-rc. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter_bridge.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index ab8f76dba668..f2fdb5a52070 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -39,12 +39,24 @@ static inline void br_drop_fake_rtable(struct sk_buff *skb)
39 39
40static inline int nf_bridge_get_physinif(const struct sk_buff *skb) 40static inline int nf_bridge_get_physinif(const struct sk_buff *skb)
41{ 41{
42 return skb->nf_bridge ? skb->nf_bridge->physindev->ifindex : 0; 42 struct nf_bridge_info *nf_bridge;
43
44 if (skb->nf_bridge == NULL)
45 return 0;
46
47 nf_bridge = skb->nf_bridge;
48 return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0;
43} 49}
44 50
45static inline int nf_bridge_get_physoutif(const struct sk_buff *skb) 51static inline int nf_bridge_get_physoutif(const struct sk_buff *skb)
46{ 52{
47 return skb->nf_bridge ? skb->nf_bridge->physoutdev->ifindex : 0; 53 struct nf_bridge_info *nf_bridge;
54
55 if (skb->nf_bridge == NULL)
56 return 0;
57
58 nf_bridge = skb->nf_bridge;
59 return nf_bridge->physoutdev ? nf_bridge->physoutdev->ifindex : 0;
48} 60}
49 61
50static inline struct net_device * 62static inline struct net_device *