patch-2.4.0-test3 linux/net/sched/sch_red.c
Next file: linux/net/sched/sch_teql.c
Previous file: linux/net/packet/af_packet.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Sun Jul 9 22:30:41 2000
- Orig file:
v2.4.0-test2/linux/net/sched/sch_red.c
- Orig date:
Thu Mar 2 14:36:23 2000
diff -u --recursive --new-file v2.4.0-test2/linux/net/sched/sch_red.c linux/net/sched/sch_red.c
@@ -39,6 +39,7 @@
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/pkt_sched.h>
+#include <net/inet_ecn.h>
#define RED_ECN_ECT 0x02
#define RED_ECN_CE 0x01
@@ -170,14 +171,9 @@
if (!(tos & RED_ECN_ECT))
return 0;
- if (!(tos & RED_ECN_CE)) {
- u32 check = skb->nh.iph->check;
+ if (!(tos & RED_ECN_CE))
+ IP_ECN_set_ce(skb->nh.iph);
- check += __constant_htons(0xFFFE);
- skb->nh.iph->check = check + (check>>16);
-
- skb->nh.iph->tos = tos | RED_ECN_CE;
- }
return 1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)