* [PATCH] arptables: use arp_hdr_len()
@ 2010-07-23 3:21 Changli Gao
2010-07-23 11:41 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2010-07-23 3:21 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao
arptables: use arp_hdr_len()
use arp_hdr_len()
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
net/ipv4/netfilter/arp_tables.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 16c0ba0..c868dd5 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -283,16 +283,13 @@ unsigned int arpt_do_table(struct sk_buff *skb,
arp = arp_hdr(skb);
do {
const struct arpt_entry_target *t;
- int hdr_len;
if (!arp_packet_match(arp, skb->dev, indev, outdev, &e->arp)) {
e = arpt_next_entry(e);
continue;
}
- hdr_len = sizeof(*arp) + (2 * sizeof(struct in_addr)) +
- (2 * skb->dev->addr_len);
- ADD_COUNTER(e->counters, hdr_len, 1);
+ ADD_COUNTER(e->counters, arp_hdr_len(skb->dev), 1);
t = arpt_get_target_c(e);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arptables: use arp_hdr_len()
2010-07-23 3:21 [PATCH] arptables: use arp_hdr_len() Changli Gao
@ 2010-07-23 11:41 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2010-07-23 11:41 UTC (permalink / raw)
To: Changli Gao; +Cc: David S. Miller, netfilter-devel, netdev
On 23.07.2010 05:21, Changli Gao wrote:
> arptables: use arp_hdr_len()
>
> use arp_hdr_len()
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-23 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 3:21 [PATCH] arptables: use arp_hdr_len() Changli Gao
2010-07-23 11:41 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).