Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2181?usp=email

to review the following change.


Change subject: resolve: store the address family in --preresolve cache entries
......................................................................

resolve: store the address family in --preresolve cache entries

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]>
---
M src/openvpn/resolve.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/81/2181/1

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)

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2181?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iae65693f49f43a66bf6f58bbefa7c33618ebc4a7
Gerrit-Change-Number: 2181
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to