From 8a673f1062543f3f3863d255e4bb781bfbc9172c Mon Sep 17 00:00:00 2001 From: Tonton Jo <60965766+Tontonjo@users.noreply.github.com> Date: Thu, 16 May 2024 17:24:45 +0200 Subject: [PATCH] fix error "UDPv6: Can't assign requested address (code=49)" This bug appears when you let the openvpn server in "multihome" configuration, preventing the connexion to be established. Related to and fixed by user hashiz in openvpn community but not yet implemented. https://community.openvpn.net/openvpn/attachment/ticket/874/patch-src-openvpn-socket.c Tested this fix on my setup with success --- 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 24d12768289..555cb67420e 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -3481,7 +3481,7 @@ link_socket_write_udp_posix_sendmsg(struct link_socket *sock, cmsg->cmsg_type = IPV6_PKTINFO; pkti6 = (struct in6_pktinfo *) CMSG_DATA(cmsg); - pkti6->ipi6_ifindex = to->pi.in6.ipi6_ifindex; + pkti6->ipi6_ifindex = 0; pkti6->ipi6_addr = to->pi.in6.ipi6_addr; break; }