net/interfaces: define DefaultRouteInterface and State.DefaultRouteInterface

It was pretty ill-defined before and mostly for logging. But I wanted
to start depending on it, so define what it is and make Windows match
the other operating systems, without losing the log output we had
before. (and add tests for that)

Change-Id: I0fbbba1cfc67a265d09dd6cb738b73f0f6005247
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-12-29 10:37:33 -08:00
committed by Brad Fitzpatrick
parent 96cab21383
commit 04c2c5bd80
6 changed files with 132 additions and 24 deletions

View File

@@ -11,6 +11,6 @@ import "errors"
var errTODO = errors.New("TODO")
func DefaultRouteInterface() (string, error) {
return "TODO", errTODO
func defaultRoute() (DefaultRouteDetails, error) {
return DefaultRouteDetails{}, errTODO
}