From: Razvan Cojocaru <[email protected]> get_cached_dns_entry() matches on ai_family, which do_preresolve_host() never set. Any lookup with an explicit family missed the cache, so each restart resolved again and appended duplicate cache entries.
Configs with an explicit address family now reuse the preresolved addresses across reconnects, as documented, instead of resolving again each time. Change-Id: Iae65693f49f43a66bf6f58bbefa7c33618ebc4a7 Signed-off-by: Razvan Cojocaru <[email protected]> Acked-by: Lev Stipakov <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2181 --- 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/+/2181 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov <[email protected]> diff --git a/src/openvpn/resolve.c b/src/openvpn/resolve.c index 46a7f7b..d1b132f 100644 --- a/src/openvpn/resolve.c +++ b/src/openvpn/resolve.c @@ -561,6 +561,7 @@ ph->ai = ai; ph->hostname = hostname; ph->servname = servname; + ph->ai_family = af; ph->flags = flags & GETADDR_CACHE_MASK; if (!c->c1.dns_cache) _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
