]> git.baikalelectronics.ru Git - kernel.git/commit
esp: Fix skb tailroom calculation
authorSteffen Klassert <steffen.klassert@secunet.com>
Fri, 25 Aug 2017 05:34:35 +0000 (07:34 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 25 Aug 2017 07:26:24 +0000 (09:26 +0200)
commit8f3272f85ce7ce12fd4ecf6c17e421cb8018a914
tree432d194da894dfa6f0911191987e68885235513a
parent5a69d6656c55a9e1211f0309f0bd7508bf2e2a9f
esp: Fix skb tailroom calculation

We use skb_availroom to calculate the skb tailroom for the
ESP trailer. skb_availroom calculates the tailroom and
subtracts this value by reserved_tailroom. However
reserved_tailroom is a union with the skb mark. This means
that we subtract the tailroom by the skb mark if set.
Fix this by using skb_tailroom instead.

Fixes: 1f6f9496b0f0 ("esp4: Avoid skb_cow_data whenever possible")
Fixes: 73a7b070a864 ("esp6: Avoid skb_cow_data whenever possible")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/esp4.c
net/ipv6/esp6.c