Skip to content

Commit

Permalink
batman-adv: Set skb priority in fragments
Browse files Browse the repository at this point in the history
BATMAN will set the skb->priority based on the IP precedence or 802.1q
tag. However, if it needs to fragment the frame, it currently leaves
the fragment skb with the default priority and actually overwrites the
priority in the unfragmented frame. Fix this.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
  • Loading branch information
Andrew Lunn authored and Simon Wunderlich committed Jun 30, 2016
1 parent 7db682d commit 1914848
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/batman-adv/fragmentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/kernel.h>
#include <linux/lockdep.h>
#include <linux/netdevice.h>
#include <linux/pkt_sched.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
Expand Down Expand Up @@ -414,7 +413,7 @@ static struct sk_buff *batadv_frag_create(struct sk_buff *skb,
if (!skb_fragment)
goto err;

skb->priority = TC_PRIO_CONTROL;
skb_fragment->priority = skb->priority;

/* Eat the last mtu-bytes of the skb */
skb_reserve(skb_fragment, header_size + ETH_HLEN);
Expand Down

0 comments on commit 1914848

Please sign in to comment.