Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit 74fa2e6070e8934f31c9b08b801e104355e51c3b Author: Antonio Quartulli ordex@autistici.org Date: Thu Aug 8 01:18:19 2013 +0200
batman-adv: use proper network order conversion
Introduced by eb7643628a608cb338d48d298ce7ca15fadfb239 ("batman-adv: set skb priority according to content")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
74fa2e6070e8934f31c9b08b801e104355e51c3b main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.c b/main.c index ed97382..58c98b6 100644 --- a/main.c +++ b/main.c @@ -283,7 +283,7 @@ void batadv_skb_set_priority(struct sk_buff *skb, int offset) sizeof(*vhdr), &vhdr_tmp); if (!vhdr) return; - prio = htons(vhdr->h_vlan_TCI) & VLAN_PRIO_MASK; + prio = ntohs(vhdr->h_vlan_TCI) & VLAN_PRIO_MASK; prio = prio >> VLAN_PRIO_SHIFT; break; case htons(ETH_P_IP):