]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
dns: do not run updown scripts with lwipovpn master
authorHeiko Hund <heiko@ist.eigentlich.net>
Tue, 8 Jul 2025 18:52:04 +0000 (20:52 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 9 Jul 2025 07:26:38 +0000 (09:26 +0200)
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
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20250708185210.30421-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32069.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c

index af097f8500033695d363259909a84357be1f8e18..0662b4992936ae9e6cf2ade8590f125dc4495766 100644 (file)
@@ -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 @@ dhcp_options_postprocess_dns(struct options *o, struct env_set *es)
     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 */