diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-12 19:56:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:12 -0400 |
commit | d0a92be05ed4aea7d35c2b257e3f9173565fe4eb (patch) | |
tree | de57331758805956bcb54dda798e3ca76dd5a46f /net | |
parent | fd74e6ccd522e2f26163eb5ac1abebcab2bd017c (diff) |
[SK_BUFF]: Introduce arp_hdr(), remove skb->nh.arph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_netfilter.c | 2 | ||||
-rw-r--r-- | net/core/netpoll.c | 2 | ||||
-rw-r--r-- | net/ipv4/arp.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/arpt_mangle.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index ebe740f6b902..0ee74b1e4770 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -670,7 +670,7 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff **pskb, | |||
670 | (*pskb)->nh.raw += VLAN_HLEN; | 670 | (*pskb)->nh.raw += VLAN_HLEN; |
671 | } | 671 | } |
672 | 672 | ||
673 | if (skb->nh.arph->ar_pln != 4) { | 673 | if (arp_hdr(skb)->ar_pln != 4) { |
674 | if (IS_VLAN_ARP(skb)) { | 674 | if (IS_VLAN_ARP(skb)) { |
675 | skb_push(*pskb, VLAN_HLEN); | 675 | skb_push(*pskb, VLAN_HLEN); |
676 | (*pskb)->nh.raw -= VLAN_HLEN; | 676 | (*pskb)->nh.raw -= VLAN_HLEN; |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index c4cec17be334..496b06244a8e 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -363,7 +363,7 @@ static void arp_reply(struct sk_buff *skb) | |||
363 | 363 | ||
364 | skb_reset_network_header(skb); | 364 | skb_reset_network_header(skb); |
365 | skb->h.raw = skb->data; | 365 | skb->h.raw = skb->data; |
366 | arp = skb->nh.arph; | 366 | arp = arp_hdr(skb); |
367 | 367 | ||
368 | if ((arp->ar_hrd != htons(ARPHRD_ETHER) && | 368 | if ((arp->ar_hrd != htons(ARPHRD_ETHER) && |
369 | arp->ar_hrd != htons(ARPHRD_IEEE802)) || | 369 | arp->ar_hrd != htons(ARPHRD_IEEE802)) || |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 01d0e8dd17d8..7110779a0244 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -721,7 +721,7 @@ static int arp_process(struct sk_buff *skb) | |||
721 | if (in_dev == NULL) | 721 | if (in_dev == NULL) |
722 | goto out; | 722 | goto out; |
723 | 723 | ||
724 | arp = skb->nh.arph; | 724 | arp = arp_hdr(skb); |
725 | 725 | ||
726 | switch (dev_type) { | 726 | switch (dev_type) { |
727 | default: | 727 | default: |
@@ -937,7 +937,7 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev, | |||
937 | (2 * sizeof(u32))))) | 937 | (2 * sizeof(u32))))) |
938 | goto freeskb; | 938 | goto freeskb; |
939 | 939 | ||
940 | arp = skb->nh.arph; | 940 | arp = arp_hdr(skb); |
941 | if (arp->ar_hln != dev->addr_len || | 941 | if (arp->ar_hln != dev->addr_len || |
942 | dev->flags & IFF_NOARP || | 942 | dev->flags & IFF_NOARP || |
943 | skb->pkt_type == PACKET_OTHERHOST || | 943 | skb->pkt_type == PACKET_OTHERHOST || |
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 57b0221f9e24..cae41215e3c7 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -245,7 +245,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb, | |||
245 | e = get_entry(table_base, private->hook_entry[hook]); | 245 | e = get_entry(table_base, private->hook_entry[hook]); |
246 | back = get_entry(table_base, private->underflow[hook]); | 246 | back = get_entry(table_base, private->underflow[hook]); |
247 | 247 | ||
248 | arp = (*pskb)->nh.arph; | 248 | arp = arp_hdr(*pskb); |
249 | do { | 249 | do { |
250 | if (arp_packet_match(arp, (*pskb)->dev, indev, outdev, &e->arp)) { | 250 | if (arp_packet_match(arp, (*pskb)->dev, indev, outdev, &e->arp)) { |
251 | struct arpt_entry_target *t; | 251 | struct arpt_entry_target *t; |
@@ -297,7 +297,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb, | |||
297 | t->data); | 297 | t->data); |
298 | 298 | ||
299 | /* Target might have changed stuff. */ | 299 | /* Target might have changed stuff. */ |
300 | arp = (*pskb)->nh.arph; | 300 | arp = arp_hdr(*pskb); |
301 | 301 | ||
302 | if (verdict == ARPT_CONTINUE) | 302 | if (verdict == ARPT_CONTINUE) |
303 | e = (void *)e + e->next_offset; | 303 | e = (void *)e + e->next_offset; |
diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c index af1c8593eb19..b4450f1ccc1b 100644 --- a/net/ipv4/netfilter/arpt_mangle.c +++ b/net/ipv4/netfilter/arpt_mangle.c | |||
@@ -30,7 +30,7 @@ target(struct sk_buff **pskb, | |||
30 | *pskb = nskb; | 30 | *pskb = nskb; |
31 | } | 31 | } |
32 | 32 | ||
33 | arp = (*pskb)->nh.arph; | 33 | arp = arp_hdr(*pskb); |
34 | arpptr = skb_network_header(*pskb) + sizeof(*arp); | 34 | arpptr = skb_network_header(*pskb) + sizeof(*arp); |
35 | pln = arp->ar_pln; | 35 | pln = arp->ar_pln; |
36 | hln = arp->ar_hln; | 36 | hln = arp->ar_hln; |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index af5b82b8ceb7..d3b16817a991 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -521,7 +521,7 @@ arp_mangle(unsigned int hook, | |||
521 | const struct net_device *out, | 521 | const struct net_device *out, |
522 | int (*okfn)(struct sk_buff *)) | 522 | int (*okfn)(struct sk_buff *)) |
523 | { | 523 | { |
524 | struct arphdr *arp = (*pskb)->nh.arph; | 524 | struct arphdr *arp = arp_hdr(*pskb); |
525 | struct arp_payload *payload; | 525 | struct arp_payload *payload; |
526 | struct clusterip_config *c; | 526 | struct clusterip_config *c; |
527 | 527 | ||