Skip to contentSkip to conversation

: Avoid unncessary checksum validation in UDP connection tracking

PATCH In review Patrick McHardy 1 participant 1 message Jun 20, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/7 : Avoid unncessary checksum validation in UDP connection tracking

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

---
commit f324916223389c944e50fa8b2c514bacf3f460c5
tree e67258b81c73684aa0cfc8117243b9c0b303324f
parent 2976a51fd8ab66770b1b3083ffaa41bd05d70e1e
author Keir Fraser <[email protected]> Mon, 20 Jun 2005 18:52:00 committer Patrick McHardy <[email protected]> Mon, 20 Jun 2005 18:52:00

 net/ipv4/netfilter/ip_conntrack_proto_udp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/ipv4/netfilter/ip_conntrack_proto_udp.c +1 -0
@@ -120,6 +120,7 @@ static int udp_error(struct sk_buff *skb
 	 * 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))) {