Files
ctrld/cmd/cli/net_others.go
T
Anthony Wong 8ae09ac98e feat(cli): put the network state of the host in the log journal
The journal records the network state of the host and each change of
that state. The support team reads one file to see the interfaces, the
routes, the resolvers, and the recoveries around an incident. The same
file shows the health of the query path. A change that touches only
AirDrop or virtual interfaces runs no DNS work.
2026-09-28 16:49:05 +07:00

38 lines
1.0 KiB
Go

//go:build !darwin && !windows && !linux
package cli
import (
"net"
"tailscale.com/net/netmon"
)
func patchNetIfaceName(iface *net.Interface) (bool, error) { return true, nil }
func validInterface(iface *net.Interface, validIfacesMap map[string]struct{}) bool { return true }
// validInterfacesMap returns a set containing only default route interfaces.
func validInterfacesMap() map[string]struct{} {
defaultRoute, err := netmon.DefaultRoute()
if err != nil {
return nil
}
return map[string]struct{}{defaultRoute.InterfaceName: {}}
}
// platformInterfaceMeta returns no names. These platforms have no source for
// them, so the interface name decides the class.
func platformInterfaceMeta(name string) (class, hardwarePort, service string) {
return "", "", ""
}
// platformVirtualInterfaces returns no set.
func platformVirtualInterfaces() map[string]struct{} {
return nil
}
// refreshInterfaceMeta does no work. These platforms keep no interface names,
// so an adapter that appears leaves nothing stale.
func refreshInterfaceMeta() {}