mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-02 22:52:33 -08:00
netmon only listened for IPv4 ip rule events, so when another process (systemd-networkd, or an "ip rule flush") deleted Tailscale's IPv6 ip rules the router never noticed and never restored them. It also parsed rule deletions as route messages, which fails for rules with selectors whose attribute numbers mean something else for routes (FRA_UID_RANGE is RTA_ENCAP_TYPE). Listen for IPv6 rule events too, and report each deleted rule's address family in RuleDeleted. Decode the rule header, and of the attributes only the priority and table, skipping ones this package doesn't know, which newer kernels keep adding (6.15 adds FRA_SPORT_MASK to single-port rules). Log deleted rules only at verbose level, as they are routine. The router ignores IPv6 deletions while it has no IPv6 rules installed. Also report Tailscale-range addresses on interfaces other than the Tailscale one, such as a carrier-grade NAT underlay address, instead of ignoring them: they are real network changes. Updates #3310 Signed-off-by: Mike O'Driscoll <[email protected]>