mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 18:41:40 +00:00
net/interfaces: include DefaultRouteInterface in interfaces.State
And log it in wgengine on change. Changing bug in #643. Updates #643
This commit is contained in:
@@ -212,6 +212,7 @@ func newUserspaceEngineAdvanced(conf EngineConfig) (_ Engine, reterr error) {
|
||||
}
|
||||
e.localAddrs.Store(map[packet.IP]bool{})
|
||||
e.linkState, _ = getLinkState()
|
||||
logf("link state: %+v", e.linkState)
|
||||
|
||||
// Respond to all pings only in fake mode.
|
||||
if conf.Fake {
|
||||
@@ -1105,7 +1106,11 @@ func (e *userspaceEngine) LinkChange(isExpensive bool) {
|
||||
cur.IsExpensive = isExpensive
|
||||
needRebind := e.setLinkState(cur)
|
||||
|
||||
e.logf("LinkChange(isExpensive=%v); needsRebind=%v", isExpensive, needRebind)
|
||||
if needRebind {
|
||||
e.logf("LinkChange: major, rebinding. New state: %+v", cur)
|
||||
} else {
|
||||
e.logf("LinkChange: minor")
|
||||
}
|
||||
|
||||
why := "link-change-minor"
|
||||
if needRebind {
|
||||
|
Reference in New Issue
Block a user