As discussed, this is part of the DNS journey - this does not add 
functionality, it just decouples old and new "backend API".

That is, "--up" scripts will no longer see "dns_server_*" environment
variables.  The assumption here is that "--up" scripts that deal with
DNS servers are typically older, and will use "foreign_options_N" anyway,
so do not benefit from the new-style environment variables - and, after
quite a bit of discussion, we agreed that we need to decouple the "frontend"
options (--dns/--dhcp_option DNS) from the backend environment variables
anyway.

So in one of the next patches in the series, "--dns" config coming in
will be exported as "foreign_options_N" *if* --dns-updown is not in use
(and that one will only ever see "dns_*" variables).


I have not tested this beyond "does it compile and pass the existing
--dns-updown script tests" - which is not much of an achievement as
the code is just being moved around, and two calls (in the context of
--up scripts) have been taken away, which is a code path not excercised
in my test sets currently ("--up with DNS config").

Your patch has been applied to the master branch.

commit 412c29c1cbf0565c94ffdbaa435ef3dc6a71e568
Author: Heiko Hund
Date:   Sat May 17 11:26:26 2025 +0200

     dns: don't publish env vars to non-dns scripts

     Signed-off-by: Heiko Hund <he...@ist.eigentlich.net>
     Acked-by: Gert Doering <g...@greenie.muc.de>
     Message-Id: <20250517092637.2103-1-g...@greenie.muc.de>
     URL: 
https://www.mail-archive.com/search?l=mid&q=20250517092637.2103-1-g...@greenie.muc.de
     Signed-off-by: Gert Doering <g...@greenie.muc.de>


--
kind regards,

Gert Doering



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to