]> git.neil.brown.name Git - history.git/commit
[IPV4/IPV6]: Fix IPsec calculation in ip_append_data/ip6_append_data
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 15 Mar 2005 02:18:07 +0000 (18:18 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 15 Mar 2005 02:18:07 +0000 (18:18 -0800)
commit51382d091af023f037458f695d5ce496e7a96913
tree7e2f7b4feac1ffe5635f3e03979c89a16a66e68e
parent8e5c060bb5321ac2b381b27ceea63c964b81277e
[IPV4/IPV6]: Fix IPsec calculation in ip_append_data/ip6_append_data

This patch fixes the IPsec overhead handling in ip_append_data and
ip6_append_data.  As it is they assume that the IPsec overhead is
constant.  This is not true as with ESP the IPsec overhead will vary
as the MTU varies.

The result is that they may produce packets that will exceed the MTU
when ESP is used.  Had it taken the trailer_len into account, it would
have produced packets less than the real MTU.

By switching to dst_mtu we get the optimal result.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv6/ip6_output.c