[Feature Request] Implement RFC3542 IPV6_USE_MIN_MTU socket option in the kernel

The Advanced Sockets Application Program Interface (API) for IPv6 allows user code to request features from the kernel.

Whilst testing Homenet hnetd I recently came across an MTU issue.

I could solve this by manually setting the MTU per interface for all packets. It would be better IMHO if the daemon could set the socket option.

However when I tried this I found the following in <linux/in6.h> in the current openwrt build tree.
#if 0 /* not yet */
#define IPV6_USE_MIN_MTU 63

Would anyone be willing to port/ back port this to the Openwrt kernel?

Edit: I found this link which could be an alternative workaround....


I've managed to work around this myself, as apparently this is more a problem of the upstream kernel than OpenWRT.

Anyway a similar solution to this worked for me in case anyone else finds this in the future:

# if defined(IPV6_USE_MIN_MTU)
# elif defined(IPV6_MTU)
			 * On Linux, PMTUD is disabled by default for datagrams
			 * so set the MTU equal to the MIN MTU to get the same.
			on = IPV6_MIN_MTU;
			if (setsockopt(nsd->udp[i].s, IPPROTO_IPV6, IPV6_MTU, 
				&on, sizeof(on)) < 0)
				log_msg(LOG_ERR, "setsockopt(..., IPV6_MTU, ...) failed: %s",
				return -1;
			on = 1;
# endif

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.