summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-05-09 20:03:36 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-06-30 10:29:43 +0200
commitc0f25c802b3300b28d1e67c58c702d29555838de (patch)
treef27c5176ee6786757fb43e522ed45d230bbfce60 /net/batman-adv/routing.c
parent1914848e0d641f8d6173bb53b6a4a392468ac725 (diff)
downloadlinux-stable-c0f25c802b3300b28d1e67c58c702d29555838de.tar.gz
linux-stable-c0f25c802b3300b28d1e67c58c702d29555838de.tar.bz2
linux-stable-c0f25c802b3300b28d1e67c58c702d29555838de.zip
batman-adv: Include frame priority in fragment header
Unfragmented frames which traverse a node have their skb->priority set by looking at the IP ToS byte, or the 802.1p header. However for fragments this is not possible, only one of the fragments will contain the headers. Instead, place the priority into the fragment header and on receiving a fragment, use this information to set the skb->priority for when the fragment is forwarded. 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>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index f75091c983ee..24fc75335b31 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -1006,6 +1006,8 @@ int batadv_recv_frag_packet(struct sk_buff *skb,
if (!orig_node_src)
goto out;
+ skb->priority = frag_packet->priority + 256;
+
/* Route the fragment if it is not for us and too big to be merged. */
if (!batadv_is_my_mac(bat_priv, frag_packet->dest) &&
batadv_frag_skb_fwd(skb, recv_if, orig_node_src)) {