[linux-next] LinuxNextTracking branch, master, updated. next-20170614

batman at open-mesh.org batman at open-mesh.org
Thu Jun 15 00:15:36 CEST 2017

The following commit has been merged in the master branch:
commit 36d4d68cd658d914ef73ac845705c4a89e7d9e2f
Author: Sven Eckelmann <sven at narfation.org>
Date:   Wed Apr 5 16:26:17 2017 +0200

    batman-adv: Fix rx packet/bytes stats on local ARP reply
    The stats are generated by batadv_interface_stats and must not be stored
    directly in the net_device stats member variable. The batadv_priv
    bat_counters information is assembled when ndo_get_stats is called. The
    stats previously stored in net_device::stats is then overwritten.
    The batman-adv counters must therefore be increased when an ARP packet is
    answered locally via the distributed arp table.
    Fixes: c384ea3ec930 ("batman-adv: Distributed ARP Table - add snooping functions for ARP messages")
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    Signed-off-by: Simon Wunderlich <sw at simonwunderlich.de>

diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index 013e970eff39..000ca2f113ab 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -1064,8 +1064,9 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
 		skb_new->protocol = eth_type_trans(skb_new, soft_iface);
-		soft_iface->stats.rx_packets++;
-		soft_iface->stats.rx_bytes += skb->len + ETH_HLEN + hdr_size;
+		batadv_inc_counter(bat_priv, BATADV_CNT_RX);
+		batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES,
+				   skb->len + ETH_HLEN + hdr_size);
 		batadv_dbg(BATADV_DBG_DAT, bat_priv, "ARP request replied locally\n");


More information about the linux-merge mailing list