ipv4: ip_do_fragment: fix headroom tests
authorVasily Averin <vvs@virtuozzo.com>
Fri, 14 Jul 2017 09:04:16 +0000 (12:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jul 2017 21:38:31 +0000 (14:38 -0700)
commit254d900b801fc04aa524ff7bafe28fdd1dbf0ed6
tree55a0227c8bebc7c9ec2c375a42ad61f4f6eafba6
parente36fef66f4bbe8a51e8f8334a058a42c0f16e373
ipv4: ip_do_fragment: fix headroom tests

Some time ago David Woodhouse reported skb_under_panic
when we try to push ethernet header to fragmented ipv6 skbs.
It was fixed for ipv6 by Florian Westphal in
commit 1d325d217c7f ("ipv6: ip6_fragment: fix headroom tests and skb leak")

However similar problem still exist in ipv4.

It does not trigger skb_under_panic due paranoid check
in ip_finish_output2, however according to Alexey Kuznetsov
current state is abnormal and ip_fragment should be fixed too.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c