netdev
[Top] [All Lists]

[IPCOMP] Exclude IPCOMP header from props.header_len

To: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
Subject: [IPCOMP] Exclude IPCOMP header from props.header_len
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 6 Jul 2004 22:31:27 +1000
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040523i
Hi Dave:

This is another patch on the way towards a unified XFRM tunnel
encapsulation function.

This patch changes the value of props.header_len for IPCOMP to
exclude the IPCOMP header.  The reason is that the IPCOMP header
is added only if the packet is compressible.  That is, if the
size of the compressed payload plus the size of the IPCOMP header
is less than that of the original payload.

This means that the IPCOMP encapsulation does not impose any
overhead at all as far as the MTU is concerned.  The current
code incorrectly reduces the MTU by the size of the IPCOMP
header.

As a side-effect, this means that we don't have to move the
IP header around when IPCOMP is used.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>