From 264fe91660fb1a7a426161a9a042ed3f9bd0a7a6 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Thu, 31 Jul 2025 12:48:27 +0200 Subject: [PATCH] Fix --dns options for TAP adapter Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has accidentally removed setting of the DHCP_OPTIONS_DHCP_OPTIONAL flag when copying --dns options. This flag is required to apply options via DHCP string, which we do for TAP adapter. As a result, --dns options stopped working for TAP. Fix by setting this flag when copying --dns options to tuntap_options. Change-Id: Id95cd14095a03afb3140a03ae96e9f5679e4fe89 Signed-off-by: Lev Stipakov Acked-by: Gert Doering Message-Id: <20250731104833.23305-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32436.html Signed-off-by: Gert Doering --- src/openvpn/options.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 53be6f5e0..3753810f1 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3579,6 +3579,7 @@ tuntap_options_postprocess_dns(struct options *o) { msg(M_WARN, "WARNING: couldn't copy all --dns server addresses to TUN/TAP"); } + tt->dhcp_options |= DHCP_OPTIONS_DHCP_OPTIONAL; return; } } -- 2.47.3