ocserv 0.10.3

Björn Ketelaars bjorn.ketelaars at hydroxide.nl
Sun May 24 05:44:42 PDT 2015


On Sun, May 24, 2015 at 1:27 PM, Nikos Mavrogiannopoulos <nmav at gnutls.org> 
wrote:

>  Do you know what is the equivalent of IPV6_MTU in freebsd?

IPV6_MTU should be IPV6_PATHMTU [1]. The latter is supported by OpenBSD, FreeBSD
and Linux. A simple patch should suffice:


--- ../src/worker-vpn.c.orig	Sun May 24 14:35:14 2015
+++ ../src/worker-vpn.c	Sun May 24 14:40:20 2015
@@ -659,7 +659,7 @@ int mtu_not_ok(worker_st * ws)
 		int mtu;
 		socklen_t len = sizeof(mtu);
 
-		if (getsockopt(ws->dtls_tptr.fd, IPPROTO_IPV6, IPV6_MTU, &mtu, &len) < 0 || mtu < 1280) {
+		if (getsockopt(ws->dtls_tptr.fd, IPPROTO_IPV6, IPV6_PATHMTU, &mtu, &len) < 0 || mtu < 1280) {
 			oclog(ws, LOG_INFO, "cannot obtain IPv6 MTU (was %u); disabling DTLS",
 			      ws->conn_mtu);
 			dtls_close(ws);


[1] http://www.rfc-editor.org/errata_search.php?rfc=3542

-- 
Björn Ketelaars <bjorn.ketelaars at hydroxide.nl>
GPG key: 0x4F0E5F21



More information about the openconnect-devel mailing list