]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[UDP]: Reread uh pointer after pskb_trim
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 7 Mar 2007 04:26:48 +0000 (20:26 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 8 Mar 2007 00:08:04 +0000 (16:08 -0800)
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>
net/ipv4/udp.c

index ce6c46034314b35a3d17d2d18d35b0538cfe5116..fc620a7c1db4d18027ade93bc04c1e9de750f4c7 100644 (file)
@@ -1215,6 +1215,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[],
 
                if (ulen < sizeof(*uh) || pskb_trim_rcsum(skb, ulen))
                        goto short_packet;
+               uh = skb->h.uh;
 
                udp4_csum_init(skb, uh);