[commits] r1777 - trunk/batman-adv

postmaster at open-mesh.org postmaster at open-mesh.org
Sun Aug 22 20:47:06 CEST 2010


Author: simon
Date: 2010-08-22 20:46:27 +0200 (Sun, 22 Aug 2010)
New Revision: 1777

Modified:
   trunk/batman-adv/soft-interface.c
Log:
batman-adv: Count Ethernet header for incoming packets

The Ethernet header is counted when transmitting a packet, so it should also 
be counted when receiving a packet. With this patch, the rx_bytes and tx_bytes
statistics behave like an ordinary Ethernet interface.

Signed-off-by: Simon Wunderlich <siwu at hrz.tu-chemnitz.de>


Modified: trunk/batman-adv/soft-interface.c
===================================================================
--- trunk/batman-adv/soft-interface.c	2010-08-20 20:42:22 UTC (rev 1776)
+++ trunk/batman-adv/soft-interface.c	2010-08-22 18:46:27 UTC (rev 1777)
@@ -222,7 +222,7 @@
 	 * PACKET_OTHERHOST or PACKET_HOST */
 
 	priv->stats.rx_packets++;
-	priv->stats.rx_bytes += skb->len;
+	priv->stats.rx_bytes += skb->len + sizeof(struct ethhdr);
 
 	soft_iface->last_rx = jiffies;
 



More information about the commits mailing list