From: Marco Baffo <[email protected]> Reset DNS records without clearing the local DNS up/down command and flags when PUSH_UPDATE replaces or removes DNS options.
Change-Id: Ib20f4965f25472f47b98981d54eaf4e2269d7408 Signed-off-by: Marco Baffo <[email protected]> Acked-by: Razvan Cojocaru <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2360 --- 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/+/2360 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru <[email protected]> diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 1e0b4d8..c35740d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3619,8 +3619,16 @@ static void reset_dns_options(struct options *options) { - gc_free(&options->dns_options.gc); - CLEAR(options->dns_options); + struct dns_options *dns = &options->dns_options; + const char *updown = dns->updown; + enum dns_updown_flags updown_flags = dns->updown_flags; + + gc_free(&dns->gc); + CLEAR(*dns); + + /* --dns-updown is local configuration, not pushed */ + dns->updown = updown; + dns->updown_flags = updown_flags; } static void _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
