xfrm: take net hdr len into account for esp payload size calculation
commit570986003b9cd61b7ccf03beacb56f5f5f6f3409
authorBenjamin Poirier <bpoirier@suse.de>
Thu, 24 May 2012 11:32:38 +0000 (24 11:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jun 2012 15:33:03 +0000 (10 00:33 +0900)
treee324b423b52a3c7819b23c603b7064ca7f505eff
parent09c073a87938a5031b396ad63c8acdfae86fc153
xfrm: take net hdr len into account for esp payload size calculation

[ Upstream commit 91657eafb64b4cb53ec3a2fbc4afc3497f735788 ]

Corrects the function that determines the esp payload size. The calculations
done in esp{4,6}_get_mtu() lead to overlength frames in transport mode for
certain mtu values and suboptimal frames for others.

According to what is done, mainly in esp{,6}_output() and tcp_mtu_to_mss(),
net_header_len must be taken into account before doing the alignment
calculation.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/esp4.c
net/ipv6/esp6.c