From 83d8af5f4226c3ab9156cbb77d5b079b65f31f19 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 7 Mar 2007 18:50:54 -0800 Subject: [PATCH] Fix UDP header pointer after pskb_trim_rcsum() [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 Signed-off-by: Greg Kroah-Hartman --- net/ipv4/udp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cfff930f2baf..f8068b06a261 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1214,6 +1214,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); -- 2.39.5