From: Lev Stipakov Date: Thu, 31 Jul 2025 10:48:27 +0000 (+0200) Subject: Fix --dns options for TAP adapter X-Git-Tag: v2.7_alpha3~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=264fe91660fb1a7a426161a9a042ed3f9bd0a7a6;p=thirdparty%2Fopenvpn.git 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 --- 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; } }