Skip to content

Commit

Permalink
[IPV4] udp: trim forgets about CHECKSUM_HW
Browse files Browse the repository at this point in the history
A UDP packet may contain extra data that needs to be trimmed off.
But when doing so, UDP forgets to fixup the skb checksum if CHECKSUM_HW
is being used.

I think this explains the case of a NFS receive using skge driver
causing 'udp hw checksum failures' when interacting with a crufty
settop box.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Sep 8, 2005
1 parent 0e4e422 commit e308e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ int udp_rcv(struct sk_buff *skb)
if (ulen > len || ulen < sizeof(*uh))
goto short_packet;

if (pskb_trim(skb, ulen))
if (pskb_trim_rcsum(skb, ulen))
goto short_packet;

if (udp_checksum_init(skb, uh, ulen, saddr, daddr) < 0)
Expand Down

0 comments on commit e308e25

Please sign in to comment.