mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 03:52:35 +00:00
wgengine/wgcfg/nmcfg: reduce some logging when a /0 route skipped
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
7b907615d5
commit
7f03c0f8fe
@ -85,8 +85,14 @@ func WGCfg(nm *netmap.NetworkMap, logf logger.Logf, flags netmap.WGConfigFlags,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
didExitNodeWarn := false
|
||||||
for _, allowedIP := range peer.AllowedIPs {
|
for _, allowedIP := range peer.AllowedIPs {
|
||||||
if allowedIP.Bits == 0 && peer.StableID != exitNode {
|
if allowedIP.Bits == 0 && peer.StableID != exitNode {
|
||||||
|
if didExitNodeWarn {
|
||||||
|
// Don't log about both the IPv4 /0 and IPv6 /0.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
didExitNodeWarn = true
|
||||||
logf("[v1] wgcfg: skipping unselected default route from %q (%v)", nodeDebugName(peer), peer.Key.ShortString())
|
logf("[v1] wgcfg: skipping unselected default route from %q (%v)", nodeDebugName(peer), peer.Key.ShortString())
|
||||||
continue
|
continue
|
||||||
} else if allowedIP.IsSingleIP() && tsaddr.IsTailscaleIP(allowedIP.IP) && (flags&netmap.AllowSingleHosts) == 0 {
|
} else if allowedIP.IsSingleIP() && tsaddr.IsTailscaleIP(allowedIP.IP) && (flags&netmap.AllowSingleHosts) == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user