Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e71af49 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: Fix HW checksum handling in TCPMSS target



Most importantly, remove bogus BUG() in receive path.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f93592ff
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -61,6 +61,10 @@ ipt_tcpmss_target(struct sk_buff **pskb,
	if (!skb_ip_make_writable(pskb, (*pskb)->len))
	if (!skb_ip_make_writable(pskb, (*pskb)->len))
		return NF_DROP;
		return NF_DROP;


	if ((*pskb)->ip_summed == CHECKSUM_HW &&
	    skb_checksum_help(*pskb, out == NULL))
		return NF_DROP;

	iph = (*pskb)->nh.iph;
	iph = (*pskb)->nh.iph;
	tcplen = (*pskb)->len - iph->ihl*4;
	tcplen = (*pskb)->len - iph->ihl*4;


@@ -186,9 +190,6 @@ ipt_tcpmss_target(struct sk_buff **pskb,
	       newmss);
	       newmss);


 retmodified:
 retmodified:
	/* We never hw checksum SYN packets.  */
	BUG_ON((*pskb)->ip_summed == CHECKSUM_HW);

	(*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED;
	(*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED;
	return IPT_CONTINUE;
	return IPT_CONTINUE;
}
}