aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 8a56d8963025..ebe740f6b902 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -48,8 +48,8 @@
48 48
49#define skb_origaddr(skb) (((struct bridge_skb_cb *) \ 49#define skb_origaddr(skb) (((struct bridge_skb_cb *) \
50 (skb->nf_bridge->data))->daddr.ipv4) 50 (skb->nf_bridge->data))->daddr.ipv4)
51#define store_orig_dstaddr(skb) (skb_origaddr(skb) = (skb)->nh.iph->daddr) 51#define store_orig_dstaddr(skb) (skb_origaddr(skb) = ip_hdr(skb)->daddr)
52#define dnat_took_place(skb) (skb_origaddr(skb) != (skb)->nh.iph->daddr) 52#define dnat_took_place(skb) (skb_origaddr(skb) != ip_hdr(skb)->daddr)
53 53
54#ifdef CONFIG_SYSCTL 54#ifdef CONFIG_SYSCTL
55static struct ctl_table_header *brnf_sysctl_header; 55static struct ctl_table_header *brnf_sysctl_header;
@@ -265,7 +265,7 @@ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb)
265static int br_nf_pre_routing_finish(struct sk_buff *skb) 265static int br_nf_pre_routing_finish(struct sk_buff *skb)
266{ 266{
267 struct net_device *dev = skb->dev; 267 struct net_device *dev = skb->dev;
268 struct iphdr *iph = skb->nh.iph; 268 struct iphdr *iph = ip_hdr(skb);
269 struct nf_bridge_info *nf_bridge = skb->nf_bridge; 269 struct nf_bridge_info *nf_bridge = skb->nf_bridge;
270 int err; 270 int err;
271 271
@@ -520,14 +520,14 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
520 if (!pskb_may_pull(skb, sizeof(struct iphdr))) 520 if (!pskb_may_pull(skb, sizeof(struct iphdr)))
521 goto inhdr_error; 521 goto inhdr_error;
522 522
523 iph = skb->nh.iph; 523 iph = ip_hdr(skb);
524 if (iph->ihl < 5 || iph->version != 4) 524 if (iph->ihl < 5 || iph->version != 4)
525 goto inhdr_error; 525 goto inhdr_error;
526 526
527 if (!pskb_may_pull(skb, 4 * iph->ihl)) 527 if (!pskb_may_pull(skb, 4 * iph->ihl))
528 goto inhdr_error; 528 goto inhdr_error;
529 529
530 iph = skb->nh.iph; 530 iph = ip_hdr(skb);
531 if (ip_fast_csum((__u8 *) iph, iph->ihl) != 0) 531 if (ip_fast_csum((__u8 *) iph, iph->ihl) != 0)
532 goto inhdr_error; 532 goto inhdr_error;
533 533