patch-2.4.26 linux-2.4.26/net/ipv4/netfilter/ipt_ECN.c
Next file: linux-2.4.26/net/ipv4/netfilter/ipt_MASQUERADE.c
Previous file: linux-2.4.26/net/ipv4/netfilter/ip_nat_standalone.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
2004-04-14 06:05:41.000000000 -0700
- Orig file:
linux-2.4.25/net/ipv4/netfilter/ipt_ECN.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.25/net/ipv4/netfilter/ipt_ECN.c linux-2.4.26/net/ipv4/netfilter/ipt_ECN.c
@@ -4,7 +4,7 @@
*
* This software is distributed under GNU GPL v2, 1991
*
- * ipt_ECN.c,v 1.4 2002/08/05 19:36:51 laforge Exp
+ * ipt_ECN.c,v 1.7 2003/12/15 15:18:06 laforge Exp
*/
#include <linux/module.h>
@@ -59,8 +59,8 @@
const struct ipt_ECN_info *einfo)
{
- struct tcphdr *tcph = (void *) iph + iph->ihl * 4;
- u_int16_t *tcpflags = (u_int16_t *)tcph + 6;
+ struct tcphdr *tcph;
+ u_int16_t *tcpflags;
u_int16_t diffs[2];
/* raw socket (tcpdump) may have clone of incoming
@@ -71,9 +71,12 @@
return NF_DROP;
kfree_skb(*pskb);
*pskb = nskb;
- iph = (*pskb)->nh.iph;
}
+ iph = (*pskb)->nh.iph;
+ tcph = (void *) iph + iph->ihl * 4;
+ tcpflags = (u_int16_t *)tcph + 6;
+
diffs[0] = *tcpflags;
if (einfo->operation & IPT_ECN_OP_SET_ECE
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)