aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2004-12-27 05:26:00 -0800
committerThomas Graf <tgraf@suug.ch>2004-12-27 05:26:00 -0800
commit6682a2bb30c9618e6140f398812ac6b92df3cc65 (patch)
tree935a67525fdc7238b79bb90ada845e735001aaf6 /net
parent7ce0e70b83543e37bb39b136b1743d3bb06eef60 (diff)
downloadhistory-6682a2bb30c9618e6140f398812ac6b92df3cc65.tar.gz
[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: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_dsmark.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index d617b7aa6f561f..19f4e4fa7f4844 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -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;