Skip to content

Commit

Permalink
[NETFILTER]: Avoid unncessary checksum validation in UDP connection t…
Browse files Browse the repository at this point in the history
…racking

Signed-off-by: Keir Fraser <Keir.Fraser@xl.cam.ac.uk>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Keir Fraser authored and David S. Miller committed Jun 21, 2005
1 parent 97216c7 commit e3be8ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/netfilter/ip_conntrack_proto_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit e3be8ba

Please sign in to comment.