Commit 83d8af5f authored by Herbert Xu's avatar Herbert Xu Committed by Greg Kroah-Hartman

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d9577efc
...@@ -1214,6 +1214,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], ...@@ -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)) if (ulen < sizeof(*uh) || pskb_trim_rcsum(skb, ulen))
goto short_packet; goto short_packet;
uh = skb->h.uh;
udp4_csum_init(skb, uh); udp4_csum_init(skb, uh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment