diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-21 01:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:10 -0400 |
commit | eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch) | |
tree | 4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /net/bridge | |
parent | e023dd643798c4f06c16466af90b4d250e4b8bd7 (diff) |
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_netfilter.c | 10 |
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 |
55 | static struct ctl_table_header *brnf_sysctl_header; | 55 | static struct ctl_table_header *brnf_sysctl_header; |
@@ -265,7 +265,7 @@ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb) | |||
265 | static int br_nf_pre_routing_finish(struct sk_buff *skb) | 265 | static 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 | ||