net/routetable: include unknown flags in the routetable doctor output
As part of the work on #7248 I wanted to know all of the flags on the RouteMessage struct that we get back from macOS. Though it doesn't turn out to be useful (when using an exit node/Tailscale is the default route, the flags for the physical interface routes are the same), it still seems useful from a debugging/comprehensiveness perspective. Adds additional Darwin flags that were output once I enabled this mode. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:

committed by
Mihai Parparita

parent
7d204d89c2
commit
21fda7f670
@ -64,6 +64,16 @@ func (r RouteEntryBSD) Format(f fmt.State, verb rune) {
|
||||
}
|
||||
pr("Flags: %v", r.Flags)
|
||||
|
||||
unknownFlags := r.RawFlags
|
||||
for fv := range flags {
|
||||
if r.RawFlags&fv == fv {
|
||||
unknownFlags &= ^fv
|
||||
}
|
||||
}
|
||||
if unknownFlags != 0 {
|
||||
pr("UnknownFlags: %x ", unknownFlags)
|
||||
}
|
||||
|
||||
w.WriteString("}")
|
||||
}).Format(f, verb)
|
||||
}
|
||||
|
Reference in New Issue
Block a user