From: Herbert Xu Date: Wed, 7 Mar 2007 04:26:48 +0000 (-0800) Subject: [UDP]: Reread uh pointer after pskb_trim X-Git-Tag: v2.6.21-rc4~99^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d644329bc9f10213a282387dfe4984ff891dd768;p=linux-2.6 [UDP]: Reread uh pointer after pskb_trim The header may have moved when trimming. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ce6c460343..fc620a7c1d 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -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);