From b5da32d572fc67bbc7d0fd38445bdf41d4b49eb2 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 3 Jun 2004 08:04:23 -0700 Subject: [PATCH] [NETFILTER]: In ipt_TCPMSS, SYN packets are never hw checksummed. Signed-off-by: David S. Miller --- net/ipv4/netfilter/ipt_TCPMSS.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c index ab7a78f32b876..4ef4782c9c4c4 100644 --- a/net/ipv4/netfilter/ipt_TCPMSS.c +++ b/net/ipv4/netfilter/ipt_TCPMSS.c @@ -186,10 +186,9 @@ ipt_tcpmss_target(struct sk_buff **pskb, newmss); retmodified: - /* If we had a hardware checksum before, it's now invalid */ - if ((*pskb)->ip_summed == CHECKSUM_HW) - if (skb_checksum_help(pskb, 0)) - return NF_DROP; + /* We never hw checksum SYN packets. */ + BUG_ON((*pskb)->ip_summed == CHECKSUM_HW); + (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED; return IPT_CONTINUE; } -- 2.53.0