From: Heiko Friedel <hf@hfnet.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: wireguard@lists.zx2c4.com
Subject: Re: WireGuard Android: Cached resolved host
Date: Mon, 5 Nov 2018 17:56:49 +0100 [thread overview]
Message-ID: <661a8a32-98e7-bb19-ebfb-8a85d6b4ffb9@hfnet.de> (raw)
In-Reply-To: <CAHmME9rm838UB=stvUPZkOVe1SuDQFNOvAyPHU7dhQscnCOahA@mail.gmail.com>
How fast is turning on and off and on?
AddressCache.java already implements a cache with a fixed TTL of 2 seconds.
A quick fix was to re-resolve with every call to getResolvedEndpoint().
I'm testing this for a couple of days without issues.
Am 04.11.2018 um 18:25 schrieb Jason A. Donenfeld:
> It's mostly this way to prevent DNS lookup failures during the network
> connectivity changes, such as turning on and off and on a tunnel
> really fast. I agree the current implementation's behavior is
> suboptimal though. Probably instead we should invalidate based on the
> TTL.
>
> The code in question lives at
> app/src/main/java/com/wireguard/config/InetEndpoint.java if you want
> to take a stab at fixing it.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
prev parent reply other threads:[~2018-11-06 0:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 16:40 Heiko Friedel
2018-11-04 17:25 ` Jason A. Donenfeld
2018-11-05 16:56 ` Heiko Friedel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=661a8a32-98e7-bb19-ebfb-8a85d6b4ffb9@hfnet.de \
--to=hf@hfnet.de \
--cc=Jason@zx2c4.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).