]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfrm: take net hdr len into account for esp payload size calculation
authorBenjamin Poirier <bpoirier@suse.de>
Thu, 24 May 2012 11:32:38 +0000 (11:32 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 10 Jun 2012 13:42:07 +0000 (14:42 +0100)
commitf7687e882a0bbdc0bbd60613ed170d5fa4d55a44
treee7ddc03892e425c9e9b2860ec93c6fd6b9e60f62
parenteaa74c53680f04bc6f9e79d930c532fb58d818d3
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: Ben Hutchings <ben@decadent.org.uk>
net/ipv4/esp4.c
net/ipv6/esp6.c