mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
ipnlocal, net/*: deprecate interfaces.GetState, use netmon more for it
Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
6d65c04987
commit
66e46bf501
@@ -4463,7 +4463,7 @@ func (b *LocalBackend) CheckIPForwarding() error {
|
||||
}
|
||||
|
||||
// TODO: let the caller pass in the ranges.
|
||||
warn, err := netutil.CheckIPForwarding(tsaddr.ExitRoutes(), nil)
|
||||
warn, err := netutil.CheckIPForwarding(tsaddr.ExitRoutes(), b.sys.NetMon.Get().InterfaceState())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@@ -1282,8 +1282,8 @@ func (h *peerAPIHandler) handleWakeOnLAN(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
var password []byte // TODO(bradfitz): support?
|
||||
st, err := interfaces.GetState()
|
||||
if err != nil {
|
||||
st := h.ps.b.sys.NetMon.Get().InterfaceState()
|
||||
if st == nil {
|
||||
http.Error(w, "failed to get interfaces state", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user