]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Clear TCP segmentation offload state in ipt_REJECT
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Feb 2007 02:12:38 +0000 (18:12 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:22 +0000 (10:50 -0800)
[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@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/netfilter/ipt_REJECT.c

index f0319e5ee437c5cdb8ed13cc3bbad8ec0f596a00..6714bd19a86ee7fbd9c6b9077f68b6ae920357e8 100644 (file)
@@ -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 */