wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent
The Engine.LinkChange method was recently removed in
e3df29d488 while misremembering how
Android's link state mechanism worked.
Rather than do some last minute rearchitecting of link state on
Android before Tailscale 1.6, restore the old Engine.LinkChange hook
for now so the Android client doesn't need any changes. But change how
it's implemented to instead inject an event into the link monitor.
Fixes #1427
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
10f48087f4
commit
ffa70a617d
@@ -89,6 +89,21 @@ type Engine interface {
|
||||
// TODO: return an error?
|
||||
Wait()
|
||||
|
||||
// LinkChange informs the engine that the system network
|
||||
// link has changed.
|
||||
//
|
||||
// The isExpensive parameter is not used.
|
||||
//
|
||||
// LinkChange should be called whenever something changed with
|
||||
// the network, no matter how minor.
|
||||
//
|
||||
// Deprecated: don't use this method. It was removed shortly
|
||||
// before the Tailscale 1.6 release when we remembered that
|
||||
// Android doesn't use the Linux-based link monitor and has
|
||||
// its own mechanism that uses LinkChange. Android is the only
|
||||
// caller of this method now. Don't add more.
|
||||
LinkChange(isExpensive bool)
|
||||
|
||||
// SetDERPMap controls which (if any) DERP servers are used.
|
||||
// If nil, DERP is disabled. It starts disabled until a DERP map
|
||||
// is configured.
|
||||
|
||||
Reference in New Issue
Block a user