summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-02-13 23:32:58 +0300
committerDavid S. Miller <davem@davemloft.net>2007-02-13 23:32:58 +0300
commitbbf4a6bc8c4d59a0a9033fc2cb96ec03430c96e4 (patch)
tree7e1e3dec020ff2eab0b3683be07f87aac3fea915 /net
parent65610fbab35b0570df4a9d0e77e111f85606b312 (diff)
downloadlinux-bbf4a6bc8c4d59a0a9033fc2cb96ec03430c96e4.tar.xz
[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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/ipt_REJECT.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index a9eb3635fff2..80f739e21824 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -80,6 +80,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 */