]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 May 2012 05:08:29 +0000 (01:08 -0400)
commit6e2269b4852ab0acd9f400c51ce95934687fa27c
treef56665f166dc09e0a2969ee17adb745c5fc89459
parent32931f7174328c08eff9e0b470161eaedfa2fe4e
xfrm: take net hdr len into account for esp payload size calculation

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>
net/ipv4/esp4.c
net/ipv6/esp6.c