ipv6: udp: fix the wrong headroom check
commit85c269fa465918e1ba4668cf8c04de68e7b2298d
authorShan Wei <shanwei@cn.fujitsu.com>
Tue, 19 Apr 2011 22:52:49 +0000 (19 22:52 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 26 Nov 2011 17:10:36 +0000 (26 09:10 -0800)
tree0cb84681ae15e5e600383a796ff70a2cef51a1f1
parentf26b4e9506488626dfaacd6733f7e963f4c4ffc2
ipv6: udp: fix the wrong headroom check

commit a9cf73ea7ff78f52662c8658d93c226effbbedde upstream.

At this point, skb->data points to skb_transport_header.
So, headroom check is wrong.

For some case:bridge(UFO is on) + eth device(UFO is off),
there is no enough headroom for IPv6 frag head.
But headroom check is always false.

This will bring about data be moved to there prior to skb->head,
when adding IPv6 frag header to skb.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-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>
net/ipv6/udp.c