From: Herbert Xu Date: Wed, 14 Feb 2007 02:12:38 +0000 (-0800) Subject: Clear TCP segmentation offload state in ipt_REJECT X-Git-Tag: v2.6.20.2~70 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=26e2080a00f3efae654ce723935eade61fa0c429;p=karo-tx-linux.git Clear TCP segmentation offload state in ipt_REJECT [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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index f0319e5ee437..6714bd19a86e 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c @@ -79,6 +79,10 @@ static void send_reset(struct sk_buff *oldskb, int hook) 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 */