ocserv 0.10.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux