Looks better than just adding AF_UNSPEC case but I noted many other FIXMEs about AF_UNSPEC that could be solved this way. So let me know if there is any reason to not use the ai_family field (and just add the AF_UNSPEC case in set_mtu_discovery)
Thanks!
From 7044e2731eeafcc7f877c7d8b77676fb5d4dbd67 Mon Sep 17 00:00:00 2001 From: Christian Pellegrin <chrip...@google.com> Date: Tue, 17 Nov 2015 12:12:10 +0000 Subject: [PATCH] Fix info.af == AF_UNSPEC case after commit 2bed089d31a12c2d0277e36a64964ebab6640f75 Signed-off-by: Christian Pellegrin <chrip...@google.com> --- src/openvpn/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 3ef7279..c7885fd 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1670,7 +1670,7 @@ phase2_set_socket_flags (struct link_socket* sock) set_cloexec (sock->ctrl_sd); /* set Path MTU discovery options on the socket */ - set_mtu_discover_type (sock->sd, sock->mtu_discover_type, sock->info.af); + set_mtu_discover_type (sock->sd, sock->mtu_discover_type, sock->info.lsa->bind_local->ai_family); #if EXTENDED_SOCKET_ERROR_CAPABILITY /* if the OS supports it, enable extended error passing on the socket */ -- 2.6.0.rc2.230.g3dd15c0