From: Herbert Xu Date: Wed, 7 Mar 2007 04:26:48 +0000 (-0800) Subject: [UDP]: Reread uh pointer after pskb_trim X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d644329bc9f10213a282387dfe4984ff891dd768;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 ce6c46034314..fc620a7c1db4 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);