Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit 2b105ca9d1ec396aa8bbdcc472d89fdc9563ca62 Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 9 15:00:11 2012 +0200
batman-adv: fix DAT packet counting
DAT packets must be counted before any batadv_dat_snoop_incoming_* invocation otherwise the counters may not be incremented at all
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
2b105ca9d1ec396aa8bbdcc472d89fdc9563ca62 routing.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/routing.c b/routing.c index e146370..96375c5 100644 --- a/routing.c +++ b/routing.c @@ -1061,6 +1061,10 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
/* packet for me */ if (batadv_is_my_mac(unicast_packet->dest)) { + if (is4addr) + batadv_dat_inc_counter(bat_priv, + unicast_4addr_packet->subtype); + if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb, hdr_size)) goto rx_success; @@ -1068,10 +1072,6 @@ int batadv_recv_unicast_packet(struct sk_buff *skb, hdr_size)) goto rx_success;
- if (is4addr) - batadv_dat_inc_counter(bat_priv, - unicast_4addr_packet->subtype); - batadv_interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size, NULL);