Commit 6682a2bb authored by Thomas Graf's avatar Thomas Graf

[PKT_SCHED]: dsmark should ignore ECN bits

Taking ECN bits into account doesn't make sense. The two bits were
still unused at the time the code was written so this brings back the
old behaviour.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7ce0e70b
......@@ -14,6 +14,7 @@
#include <linux/rtnetlink.h>
#include <net/pkt_sched.h>
#include <net/dsfield.h>
#include <net/inet_ecn.h>
#include <asm/byteorder.h>
......@@ -198,10 +199,12 @@ static int dsmark_enqueue(struct sk_buff *skb,struct Qdisc *sch)
/* FIXME: Safe with non-linear skbs? --RR */
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
skb->tc_index = ipv4_get_dsfield(skb->nh.iph);
skb->tc_index = ipv4_get_dsfield(skb->nh.iph)
& ~INET_ECN_MASK;
break;
case __constant_htons(ETH_P_IPV6):
skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h);
skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h)
& ~INET_ECN_MASK;
break;
default:
skb->tc_index = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment