From: "ordex (Code Review)" Date: Wed, 15 Nov 2023 13:45:12 +0000 References: Reply-To: a@...2181..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <66f4e0fa28801d0720f6992c646f3d790c2cfeb3-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="7/YDTVBIsOA="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: if a local IPv6 address is provided, socket must be v6-only List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --7/YDTVBIsOA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/435?usp=3Demail to review the following change. Change subject: if a local IPv6 address is provided, socket must be v6-only ...................................................................... if a local IPv6 address is provided, socket must be v6-only Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31 Signed-off-by: Antonio Quartulli --- M src/openvpn/socket.c 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/35/435/1 diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index f2bd624..17bd263 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1108,9 +1108,15 @@ } else { + bool v6only =3D sock->info.bind_ipv6_only; + + /* force binding IPv6-only if an address was specified + * an it is a IPv6 */ + if (sock->local_host && ai_family =3D=3D AF_INET6) + v6only =3D true; + socket_bind(sock->sd, sock->info.lsa->bind_local, - ai_family, - "TCP/UDP", sock->info.bind_ipv6_only); + ai_family, "TCP/UDP", v6only); } } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/435?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31 Gerrit-Change-Number: 435 Gerrit-PatchSet: 1 Gerrit-Owner: ordex Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --7/YDTVBIsOA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

ordex would like plaisthos and flichtenheld to review t= his change.

Vi= ew Change

if a local IPv6 address is provided, socket must be v6-only
Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Signed-off-by= : Antonio Quartulli <a@...2181...>
---
M src/openvpn/socket.c1 file changed, 8 insertions(+), 2 deletions(-)

git pull ssh:=
//gerrit.openvpn.net:29418/openvpn refs/changes/35/435/1
diff --git=
 a/src/openvpn/socket.c b/src/openvpn/socket.c
index f2bd62= 4..17bd263 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -1108,9 +1108,15 @@<= br> }
else
= {
+ bool v= 6only =3D sock->info.bind_ipv6_only;
+
= + /* force binding IPv6-only if an address was specified<= br>+ * an it is a I= Pv6 */
+ i= f (sock->local_host && ai_family =3D=3D AF_INET6)
+ v6only =3D true;
+
= socket_bind(sock->sd, sock->info.lsa->bind_local,<= br>- ai_fa= mily,
- = "TCP/UDP", sock->info.bind_ipv6_only);
+ ai_family, = "TCP/UDP", v6only);
}
= }
}

To view, visit = change 43= 5. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a3349c7de4202b5eb2f576e3f8= a82a9af6f7f31
Gerrit-Change-Number: 435
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <a@...2181...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--7/YDTVBIsOA=--