]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[UDP]: Reread uh pointer after pskb_trim
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 Mar 2007 07:21:15 +0000 (08:21 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 8 Mar 2007 07:21:15 +0000 (08:21 +0100)
The header may have moved when trimming.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/ipv4/udp.c

index da51d01a51030372e1228831620f3ce4f3c91a5a..19df8fedeb7524e46aa22b3ba7e71e3b8ec02f63 100644 (file)
@@ -1137,6 +1137,7 @@ int udp_rcv(struct sk_buff *skb)
 
        if (pskb_trim_rcsum(skb, ulen))
                goto short_packet;
+       uh = skb->h.uh;
 
        udp_checksum_init(skb, uh, ulen, saddr, daddr);