Skip to contentSkip to conversation

Change in openvpn[master]: dns: do not run updown scripts with lwipovpn

Openvpn-devel In review d12fk (Code Review) 2 participants 6 messages Jul 3, 2025 – Jul 9, 2025 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.1751571694000.I7e9a0c668e0950257632452cfd9eeb236f0120f2@...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/+/1077?usp=email

to review the following change.

Change subject: dns: do not run updown scripts with lwipovpn
......................................................................

dns: do not run updown scripts with lwipovpn

Running the script doesn't make sense with the AFUNIX dev node, so we simply clear any scripts that have been set before.

Change-Id I7e9a0c668e0950257632452cfd9eeb236f0120f2

---
M src/openvpn/options.c

1 file changed, 8 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/1077/1

src/openvpn/options.c +8 -0
index af097f8..0662b49 100644
@@ -61,6 +61,7 @@
 #include "xkey_common.h"
 #include "dco.h"
 #include "options_util.h"
+#include "tun_afunix.h"
 
 #include <ctype.h>
 
@@ -3593,6 +3594,13 @@
     struct gc_arena gc = gc_new();
     struct dns_options *dns = &o->dns_options;
 
+    if (is_tun_afunix(o->dev_node))
+    {
+        /* Disable running  dns-updown script with lwipovpn */
+        dns->updown_flags = DNS_UPDOWN_NO_FLAGS;
+        dns->updown = NULL;
+    }
+
     if (dns->servers || dns_updown_user_set(dns) || dns_updown_forced(dns))
     {
         /* Clean up env from --dhcp-option DNS config */
Signature · 15 lines
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1077?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: I7e9a0c668e0950257632452cfd9eeb236f0120f2
Gerrit-Change-Number: 1077
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[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

Attention is currently required from: d12fk, flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1077?usp=email )

Change subject: dns: do not run updown scripts with lwipovpn
......................................................................

Patch Set 2: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1077?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: I7e9a0c668e0950257632452cfd9eeb236f0120f2
Gerrit-Change-Number: 1077
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Mon, 07 Jul 2025 21:13:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH v2 1/1 dns: do not run updown scripts with lwipovpn

In reply to a message not in the archive

From: Heiko Hund <[email protected]...>

Running the script doesn't make sense with the AFUNIX dev node, so we simply clear any scripts that have been set before.

Change-Id I7e9a0c668e0950257632452cfd9eeb236f0120f2

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1077
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>

src/openvpn/options.c +8 -0
index af097f8..0662b49 100644
@@ -61,6 +61,7 @@
 #include "xkey_common.h"
 #include "dco.h"
 #include "options_util.h"
+#include "tun_afunix.h"
 
 #include <ctype.h>
 
@@ -3593,6 +3594,13 @@
     struct gc_arena gc = gc_new();
     struct dns_options *dns = &o->dns_options;
 
+    if (is_tun_afunix(o->dev_node))
+    {
+        /* Disable running  dns-updown script with lwipovpn */
+        dns->updown_flags = DNS_UPDOWN_NO_FLAGS;
+        dns->updown = NULL;
+    }
+
     if (dns->servers || dns_updown_user_set(dns) || dns_updown_forced(dns))
     {
         /* Clean up env from --dhcp-option DNS config */
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: dns: do not run updown scripts with lwipovpn

Lightly tested on a FreeBSD build with lwipovpn, and stared a bit at the code.

Your patch has been applied to the master branch.

commit 4dc57d923d23bdc73c7c24a9851c9137f2097d8c

Author: Heiko Hund
Date:   Tue Jul 8 20:52:04 2025 +0200
     dns: do not run updown scripts with lwipovpn

     Signed-off-by: Heiko Hund <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg32069.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

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

cron2 has uploaded a new patch set (#3) to the change originally created by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1077?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by plaisthos

Change subject: dns: do not run updown scripts with lwipovpn
......................................................................

dns: do not run updown scripts with lwipovpn

Running the script doesn't make sense with the AFUNIX dev node, so we simply clear any scripts that have been set before.

Change-Id I7e9a0c668e0950257632452cfd9eeb236f0120f2

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32069.html

---
M src/openvpn/options.c

1 file changed, 8 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/1077/3

src/openvpn/options.c +8 -0
index af097f8..0662b49 100644
@@ -61,6 +61,7 @@
 #include "xkey_common.h"
 #include "dco.h"
 #include "options_util.h"
+#include "tun_afunix.h"
 
 #include <ctype.h>
 
@@ -3593,6 +3594,13 @@
     struct gc_arena gc = gc_new();
     struct dns_options *dns = &o->dns_options;
 
+    if (is_tun_afunix(o->dev_node))
+    {
+        /* Disable running  dns-updown script with lwipovpn */
+        dns->updown_flags = DNS_UPDOWN_NO_FLAGS;
+        dns->updown = NULL;
+    }
+
     if (dns->servers || dns_updown_user_set(dns) || dns_updown_forced(dns))
     {
         /* Clean up env from --dhcp-option DNS config */

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1077?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: I7e9a0c668e0950257632452cfd9eeb236f0120f2
Gerrit-Change-Number: 1077
Gerrit-PatchSet: 3
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

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

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1077?usp=email )

Change subject: dns: do not run updown scripts with lwipovpn
......................................................................

dns: do not run updown scripts with lwipovpn

Running the script doesn't make sense with the AFUNIX dev node, so we simply clear any scripts that have been set before.

Change-Id I7e9a0c668e0950257632452cfd9eeb236f0120f2

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32069.html

---
M src/openvpn/options.c

1 file changed, 8 insertions(+), 0 deletions(-)
src/openvpn/options.c +8 -0
index af097f8..0662b49 100644
@@ -61,6 +61,7 @@
 #include "xkey_common.h"
 #include "dco.h"
 #include "options_util.h"
+#include "tun_afunix.h"
 
 #include <ctype.h>
 
@@ -3593,6 +3594,13 @@
     struct gc_arena gc = gc_new();
     struct dns_options *dns = &o->dns_options;
 
+    if (is_tun_afunix(o->dev_node))
+    {
+        /* Disable running  dns-updown script with lwipovpn */
+        dns->updown_flags = DNS_UPDOWN_NO_FLAGS;
+        dns->updown = NULL;
+    }
+
     if (dns->servers || dns_updown_user_set(dns) || dns_updown_forced(dns))
     {
         /* Clean up env from --dhcp-option DNS config */

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1077?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: I7e9a0c668e0950257632452cfd9eeb236f0120f2
Gerrit-Change-Number: 1077
Gerrit-PatchSet: 3
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged