X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fsch_red.c;h=e98f79bdb435dee959745b7e714966e0bb7f6956;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=5630abb209adb1ac1f3f88856ee434e34e8c4dbe;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 5630abb20..e98f79bdb 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -40,6 +40,7 @@ #include #include #include +#include /* Random Early Detection (RED) algorithm. @@ -162,13 +163,12 @@ static int red_ecn_mark(struct sk_buff *skb) switch (skb->protocol) { case __constant_htons(ETH_P_IP): - if (!INET_ECN_is_capable(skb->nh.iph->tos)) + if (INET_ECN_is_not_ect(skb->nh.iph->tos)) return 0; - if (INET_ECN_is_not_ce(skb->nh.iph->tos)) - IP_ECN_set_ce(skb->nh.iph); + IP_ECN_set_ce(skb->nh.iph); return 1; case __constant_htons(ETH_P_IPV6): - if (!INET_ECN_is_capable(ip6_get_dsfield(skb->nh.ipv6h))) + if (INET_ECN_is_not_ect(ipv6_get_dsfield(skb->nh.ipv6h))) return 0; IP6_ECN_set_ce(skb->nh.ipv6h); return 1;