netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPsecv6  tunnel mode fragmentation
@ 2010-12-05 22:18 Joy Latten
  2010-12-08  7:11 ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Joy Latten @ 2010-12-05 22:18 UTC (permalink / raw)
  To: netdev; +Cc: samudrala, rashmin

[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]

We have come across an ipsec problem that I think was
noted a while back in the following link.
http://www.mail-archive.com/netdev@vger.kernel.org/msg61659.html

When an icmpv6 pkt-too-big message for a destination
is received, it is processed and the route's mtu is adjusted.

Transport mode uses "adjusted" mtu and works ok, but tunnel-mode
which has inner and outer iphdrs has problems.

ah and esp leave it to the ipv6 layer to fragment.
So, it seems esp/ah tunnel mode can produce an outgoing ipsec tunnel
mode pkt whose inner pkthdr has the dst with the adjusted mtu,
but inner pkt size larger than the adjusted mtu.

The outer pkthdr has tunnel's dst mtu  which has not been 
adjusted, since the pkt-too-big message was not for it.
So, ipv6 layer will use outer mtu to decide whether to fragment or not.
It doesn't appear to use the inner, "adjusted" mtu.
In the tcpdump attached below, since outer mtu is larger than the
outgoing pkt's size, it is not fragmented.

Thus lies the problem. So when the link with the "adjusted" mtu
gets the decrypted packet, the decrypted pkt may be too large for the
link's mtu. The "adjusted" mtu was never regarded when creating the pkt.

Hopefully, I have explained this clearly, if not
let me know. Should esp/ah pre-fragment... or should mtu of 
inner pkt's dst be used for outer pkt? What's the best way to approach
this? Thanks for any info.

regards,
Joy 

ipsec config:

target <-------> Secuity gateway <-----> host
        (tunnel)

attachment is tcpdump from target.


[-- Attachment #2: target.bin --]
[-- Type: application/octet-stream, Size: 10236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-09 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05 22:18 IPsecv6 tunnel mode fragmentation Joy Latten
2010-12-08  7:11 ` Herbert Xu
2010-12-08 20:37   ` David Miller
2010-12-09  2:20   ` Joy Latten
2010-12-09 12:44     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).