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

Commit e3be8ba7 authored by Keir Fraser's avatar Keir Fraser Committed by David S. Miller
Browse files

[NETFILTER]: Avoid unncessary checksum validation in UDP connection tracking

parent 97216c79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ static int udp_error(struct sk_buff *skb, enum ip_conntrack_info *ctinfo,
	 * and moreover root might send raw packets.
	 * FIXME: Source route IP option packets --RR */
	if (hooknum == NF_IP_PRE_ROUTING
	    && skb->ip_summed != CHECKSUM_UNNECESSARY
	    && csum_tcpudp_magic(iph->saddr, iph->daddr, udplen, IPPROTO_UDP,
			         skb->ip_summed == CHECKSUM_HW ? skb->csum
			      	 : skb_checksum(skb, iph->ihl*4, udplen, 0))) {