[patch 035/101] Clear TCP segmentation offload state in ipt_REJECT

From: Greg KH
Date: Wed Mar 07 2007 - 12:48:28 EST


From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

[NETFILTER]: Clear GSO bits for TCP reset packet

The TCP reset packet is copied from the original. This
includes all the GSO bits which do not apply to the new
packet. So we should clear those bits.

Spotted by Patrick McHardy.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
net/ipv4/netfilter/ipt_REJECT.c | 4 ++++
1 file changed, 4 insertions(+)

--- linux-2.6.20.1.orig/net/ipv4/netfilter/ipt_REJECT.c
+++ linux-2.6.20.1/net/ipv4/netfilter/ipt_REJECT.c
@@ -79,6 +79,10 @@ static void send_reset(struct sk_buff *o
nskb->mark = 0;
skb_init_secmark(nskb);

+ skb_shinfo(nskb)->gso_size = 0;
+ skb_shinfo(nskb)->gso_segs = 0;
+ skb_shinfo(nskb)->gso_type = 0;
+
tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl);

/* Swap source and dest */

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/