[SECNET PATCH 1/6] mobile sites: Do not ever expire peer addresses
Ian Jackson
ijackson at chiark.greenend.org.uk
Thu Feb 13 17:52:07 GMT 2020
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 <ijackson at chiark.greenend.org.uk>
---
site.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/site.c b/site.c
index df083f409..89e415c7f 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.11.0
More information about the sgo-software-discuss
mailing list