all: update tailscale.com to v1.74.0

This commit is contained in:
Cuong Manh Le
2024-09-13 20:10:26 +07:00
committed by Cuong Manh Le
parent 7088df58dd
commit 617674ce43
29 changed files with 974 additions and 379 deletions
+5 -4
View File
@@ -21,10 +21,11 @@ import (
"syscall"
"time"
"tailscale.com/net/netmon"
"github.com/kardianos/service"
"github.com/rs/zerolog"
"github.com/spf13/viper"
"tailscale.com/net/interfaces"
"tailscale.com/net/tsaddr"
"github.com/Control-D-Inc/ctrld"
@@ -834,7 +835,7 @@ func ifaceFirstPrivateIP(iface *net.Interface) string {
// defaultRouteIP returns private IP string of the default route if present, prefer IPv4 over IPv6.
func defaultRouteIP() string {
dr, err := interfaces.DefaultRoute()
dr, err := netmon.DefaultRoute()
if err != nil {
return ""
}
@@ -854,7 +855,7 @@ func defaultRouteIP() string {
// There could be multiple LAN interfaces with the same Mac address, so we find all private
// IPs then using the smallest one.
var addrs []netip.Addr
interfaces.ForeachInterface(func(i interfaces.Interface, prefixes []netip.Prefix) {
netmon.ForeachInterface(func(i netmon.Interface, prefixes []netip.Prefix) {
if i.Name == drNetIface.Name {
return
}
@@ -894,7 +895,7 @@ func canBeLocalUpstream(addr string) bool {
// log message when error happens.
func withEachPhysicalInterfaces(excludeIfaceName, context string, f func(i *net.Interface) error) {
validIfacesMap := validInterfacesMap()
interfaces.ForeachInterface(func(i interfaces.Interface, prefixes []netip.Prefix) {
netmon.ForeachInterface(func(i netmon.Interface, prefixes []netip.Prefix) {
// Skip loopback/virtual interface.
if i.IsLoopback() || len(i.HardwareAddr) == 0 {
return