tree 295885afa3300455fa1b7cb0dd18a543d73fc744
parent 0e4e4220f10bf8f58a8606f0cb28538088c64b1a
author Stephen Hemminger <[EMAIL PROTECTED]> Fri, 09 Sep 2005 02:32:21 -0700
committer David S. Miller <[EMAIL PROTECTED]> Fri, 09 Sep 2005 02:32:21 -0700

[IPV4] udp: trim forgets about CHECKSUM_HW

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 <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/ipv4/udp.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -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)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to