diff options
author | Linus Lüssing <linus.luessing@c0d3.blue> | 2017-02-17 11:17:07 +0100 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2017-03-26 12:46:44 +0200 |
commit | e2d9ba43559e5fcd94a365ba86718332737b0817 (patch) | |
tree | 0ebe05e8cb92fd74c617b30c837a4ee3dc500dfd /net/batman-adv/distributed-arp-table.c | |
parent | batman-adv: privatize forw_packet skb assignment (diff) | |
download | linux-e2d9ba43559e5fcd94a365ba86718332737b0817.tar.xz linux-e2d9ba43559e5fcd94a365ba86718332737b0817.zip |
batman-adv: restructure rebroadcast counter into forw_packet API
This patch refactors the num_packets counter of a forw_packet in the
following three ways:
1) Removed dual-use of forw_packet::num_packets:
-> now for aggregation purposes only
2) Using forw_packet::skb::cb::num_bcasts instead:
-> for easier access in aggregation code later
3) make access to num_bcasts private to batadv_forw_packet_*()
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
[sven@narfation.org: Change num_bcasts to unsigned]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/distributed-arp-table.c')
-rw-r--r-- | net/batman-adv/distributed-arp-table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 77ede40ff529..0608fcf99e7b 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -1303,7 +1303,7 @@ bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv, /* If this packet is an ARP_REQUEST and the node already has the * information that it is going to ask, then the packet can be dropped */ - if (forw_packet->num_packets) + if (batadv_forw_packet_is_rebroadcast(forw_packet)) goto out; vid = batadv_dat_get_vid(forw_packet->skb, &hdr_size); |