From cfa89389d4ffbb8f28dcc15a3caa702fe9fc50fe Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 2 Feb 2020 12:22:57 +0000 Subject: [PATCH] mobile sites: Do not ever expire peer addresses For mobile sites, peer addresses come from our config or DNS name lookup. Ones that are not working now may work later in a different network environment. The mobile end is in charge of public path selection so it needs to retain the information to try these currently-non-working addresses. In practice, this change allows me to switch backwards and forwards between the FOSDEM v6-only wifi, and my v4-only USB stick. Signed-off-by: Ian Jackson --- site.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site.c b/site.c index df083f4..89e415c 100644 --- a/site.c +++ b/site.c @@ -2617,6 +2617,8 @@ static void transport_peers_debug(struct site *st, transport_peers *dst, static void transport_peers_expire(struct site *st, transport_peers *peers) { /* peers must be sorted first */ + if (st->local_mobile) return; + int previous_peers=peers->npeers; struct timeval oldest; oldest.tv_sec = tv_now->tv_sec - st->mobile_peer_expiry; -- 2.30.2