IPv6 tunnel bug

Francis Dupont fdupont at isc.org
Mon Feb 27 13:24:05 UTC 2012


BTW if someone has a good contact in the Linux kernel team, there is
a bug in the IPv6 tunneling (in fact tunneling of anything over IPv6)
in all kernels up to the last stable one (I've just checked):
the internal MTU is set to the external MTU - sizeof(IPv6 header)
which is very silly: when a big packet is encapsulated it must not
be dropped or fragmented, it must be sent in multiple external IPv6
fragments.

Note this is true for any tunnels: the fragmentation must be done at
the external (aka encapsulating) level, never at the internal (aka
encapsulated) level.

Regards

Francis Dupont <fdupont at isc.org>

PS: I have a patch which removes the spurious code (yes, the bug is
in some lines of code which should not be there :-):

*** /usr/src/linux/net/ipv6/ip6_tunnel.c	2008-07-13 23:51:29.000000000 +0200
--- ip6_tunnel+.c	2008-12-09 01:25:33.000000000 +0100
***************
*** 888,898 ****
  		mtu = IPV6_MIN_MTU;
  	if (skb->dst)
  		skb->dst->ops->update_pmtu(skb->dst, mtu);
- 	if (skb->len > mtu) {
- 		*pmtu = mtu;
- 		err = -EMSGSIZE;
- 		goto tx_err_dst_release;
- 	}
  
  	/*
  	 * Okay, now see if we can stuff it in the buffer as-is.
--- 888,893 ----


More information about the sdcpe-devel mailing list