[1/2] batman-adv: Remove unused skb_reset_mac_header()

Message ID 1469187482-29894-1-git-send-email-linus.luessing@c0d3.blue (mailing list archive)
State Superseded, archived
Delegated to: Marek Lindner
Headers

Commit Message

Linus Lüssing July 22, 2016, 11:38 a.m. UTC
  During broadcast queueing, the skb_reset_mac_header() sets the skb
to a place invalid for a MAC header, pointing right into the
batman-adv broadcast packet. Luckily, no one seems to actually use
eth_hdr(skb) afterwards until batadv_send_skb_packet() resets the
header to a valid position again.

Therefore removing this unnecessary, weird skb_reset_mac_header()
call.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
 net/batman-adv/send.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Sven Eckelmann July 22, 2016, 1:17 p.m. UTC | #1
On Freitag, 22. Juli 2016 13:38:01 CEST Linus Lüssing wrote:
> During broadcast queueing, the skb_reset_mac_header() sets the skb
> to a place invalid for a MAC header, pointing right into the
> batman-adv broadcast packet. Luckily, no one seems to actually use
> eth_hdr(skb) afterwards until batadv_send_skb_packet() resets the
> header to a valid position again.
> 
> Therefore removing this unnecessary, weird skb_reset_mac_header()
> call.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>

Reviewed-by: Sven Eckelmann <sven@narfation.org>

Kind regards,
	Sven
  

Patch

diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 8d4e1f5..97bdb0c 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -586,8 +586,6 @@  int batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv,
 	bcast_packet = (struct batadv_bcast_packet *)newskb->data;
 	bcast_packet->ttl--;
 
-	skb_reset_mac_header(newskb);
-
 	forw_packet->skb = newskb;
 
 	INIT_DELAYED_WORK(&forw_packet->delayed_work,