From 587d7ce100bcfa2eabbc6664122d575acac2fb83 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 14 Feb 2007 09:39:09 +0100 Subject: [PATCH] [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: Adrian Bunk --- net/ipv4/netfilter/ipt_REJECT.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index 3eb47aae78c5..e85ef898faac 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c @@ -159,6 +159,9 @@ static void send_reset(struct sk_buff *oldskb, int hook) nskb->nf_bridge = NULL; #endif + skb_shinfo(nskb)->tso_size = 0; + skb_shinfo(nskb)->tso_segs = 0; + tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl); /* Swap source and dest */ -- 2.39.5