diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-03-07 18:50:54 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-03-13 11:26:47 -0700 |
commit | 83d8af5f4226c3ab9156cbb77d5b079b65f31f19 (patch) | |
tree | a86ac19f0d55ad0aa52d98cd7b5faf9404bb5562 /net | |
parent | d9577efca33ece3024f337fd38c1f8ea5ee0acf0 (diff) |
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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/udp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cfff930f2ba..f8068b06a26 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); |