WireGuard Archive on lore.kernel.org
 help / Atom feed
* WireGuard Android: Cached resolved host
@ 2018-10-23 16:40 Heiko Friedel
  2018-11-04 17:25 ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Friedel @ 2018-10-23 16:40 UTC (permalink / raw)
  To: wireguard

Hi all!

I'm using WireGurad on Android to connect to my home server with a 
dynamic IP address. It can change from time to time.

When I need to reconnect due to achanged IP address, it seems that 
WireGurad is using a cached hostname and not re-resolving it. I have to 
"force stop" the app.

Is there a specific reason for caching the hostname?

It would also be great if WireGurad re-resolves the hostname when the 
handshake (keep alive) has timed out.

Thank you,
Heiko








_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WireGuard Android: Cached resolved host
  2018-10-23 16:40 WireGuard Android: Cached resolved host Heiko Friedel
@ 2018-11-04 17:25 ` Jason A. Donenfeld
  2018-11-05 16:56   ` Heiko Friedel
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2018-11-04 17:25 UTC (permalink / raw)
  To: hf; +Cc: WireGuard mailing list

t'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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WireGuard Android: Cached resolved host
  2018-11-04 17:25 ` Jason A. Donenfeld
@ 2018-11-05 16:56   ` Heiko Friedel
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Friedel @ 2018-11-05 16:56 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: wireguard

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 16:40 WireGuard Android: Cached resolved host Heiko Friedel
2018-11-04 17:25 ` Jason A. Donenfeld
2018-11-05 16:56   ` Heiko Friedel

WireGuard Archive on lore.kernel.org

Archives are clonable: git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox