[commits] r1758 - trunk/batman-adv

postmaster at open-mesh.org postmaster at open-mesh.org
Sun Aug 8 15:01:31 CEST 2010

Author: marek
Date: 2010-08-08 15:00:46 +0200 (Sun, 08 Aug 2010)
New Revision: 1758

batman-adv: Only clone skb data for multiple broadcasts

batman-adv tries to resend broadcasts on all interfaces up to three
times. For each round and each interface it must provide a skb which
gets consumed by the sending function.

It is unnecessary to copy the data of each broadcast because the actual
data is either not shared or already copied by add_bcast_packet_to_list.
So it is enough to just copy the skb control data

Reported-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann at gmx.de>

Modified: trunk/batman-adv/send.c
--- trunk/batman-adv/send.c	2010-08-08 13:00:41 UTC (rev 1757)
+++ trunk/batman-adv/send.c	2010-08-08 13:00:46 UTC (rev 1758)
@@ -477,7 +477,7 @@
 	list_for_each_entry_rcu(batman_if, &if_list, list) {
 		/* send a copy of the saved skb */
-		skb1 = skb_copy(forw_packet->skb, GFP_ATOMIC);
+		skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
 		if (skb1)
 				batman_if, broadcast_addr);

More information about the commits mailing list