Skip to contentSkip to conversation

Change in openvpn[master]: if a local IPv6 address is provided, socket must be v6-only

Openvpn-devel ordex (Code Review) 1 participant 4 messages Nov 15, 2023 – Sep 24, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1700055887000.I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31@...2715...

#1 lore raw

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=email

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

---
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

src/openvpn/socket.c +8 -2
index f2bd624..17bd263 100644
@@ -1108,9 +1108,15 @@
         }
         else
         {
+            bool v6only = 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 == AF_INET6)
+                v6only = 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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Gerrit-Change-Number: 435
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

ordex has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/435?usp=email )

Change subject: if a local IPv6 address is provided, socket must be v6-only
......................................................................

Abandoned
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/435?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Gerrit-Change-Number: 435
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: abandon

#3 lore raw
In reply to a message not in the archive

ordex has restored this change. ( http://gerrit.openvpn.net/c/openvpn/+/435?usp=email )

Change subject: if a local IPv6 address is provided, socket must be v6-only
......................................................................

Restored
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/435?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Gerrit-Change-Number: 435
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: restore

#4 lore raw
In reply to a message not in the archive

ordex has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/435?usp=email )

Change subject: if a local IPv6 address is provided, socket must be v6-only
......................................................................

Abandoned
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/435?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Gerrit-Change-Number: 435
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: abandon