]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fix headroom calculation in udp6_ufo_fragment
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Tue, 5 Nov 2013 01:41:27 +0000 (02:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2013 03:09:53 +0000 (22:09 -0500)
commit64fbf28c1ca42ac4f1a1257cc7c6ec6af24c3cc2
tree2adab459e35b2668b3ebb02c6156d5787e55c628
parent97735cb431cb2c574b9cefb85125eb9e45d76ca5
ipv6: fix headroom calculation in udp6_ufo_fragment

Commit 9f3b8c70b28ff33caa75fcb3019cd269c621b0c1 ("udp6: Fix udp
fragmentation for tunnel traffic.") changed the calculation if
there is enough space to include a fragment header in the skb from a
skb->mac_header dervived one to skb_headroom. Because we already peeled
off the skb to transport_header this is wrong. Change this back to check
if we have enough room before the mac_header.

This fixes a panic Saran Neti reported. He used the tbf scheduler which
skb_gso_segments the skb. The offsets get negative and we panic in memcpy
because the skb was erroneously not expanded at the head.

Reported-by: Saran Neti <Saran.Neti@telus.com>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/udp_offload.c