From b73d497010a85f1a08218f4a301972f73096cee4 Mon Sep 17 00:00:00 2001 From: Cobra Date: Tue, 14 Apr 2026 21:51:52 -0400 Subject: [PATCH] Fix seed_tailscale_peers to use CurAddr field not Endpoints tailscale status --json uses CurAddr for the active direct endpoint, not Endpoints (which is always null/absent). Without this fix the Tailscale exclusion set was always empty. --- net_alerter/net_alerter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net_alerter/net_alerter.py b/net_alerter/net_alerter.py index f073c6e..2ac09fc 100644 --- a/net_alerter/net_alerter.py +++ b/net_alerter/net_alerter.py @@ -856,8 +856,10 @@ def seed_tailscale_peers() -> None: status = json.loads(result.stdout) peer_ips = set() for peer in status.get('Peer', {}).values(): - for ep in peer.get('Endpoints', []): - ip = ep.split(':')[0] + # CurAddr is the active direct endpoint (e.g. "10.0.0.0:41641") + cur = peer.get('CurAddr', '') + if cur: + ip = cur.rsplit(':', 1)[0] if ip: peer_ips.add(ip) if not peer_ips: