Update
This commit is contained in:
5
vendor/tailscale.com/net/sockstats/label_string.go
generated
vendored
5
vendor/tailscale.com/net/sockstats/label_string.go
generated
vendored
@@ -28,8 +28,9 @@ const _Label_name = "ControlClientAutoControlClientDialerDERPHTTPClientLogtailLo
|
||||
var _Label_index = [...]uint8{0, 17, 36, 50, 63, 78, 93, 107, 123, 140, 157, 169, 186, 201}
|
||||
|
||||
func (i Label) String() string {
|
||||
if i >= Label(len(_Label_index)-1) {
|
||||
idx := int(i) - 0
|
||||
if i < 0 || idx >= len(_Label_index)-1 {
|
||||
return "Label(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _Label_name[_Label_index[i]:_Label_index[i+1]]
|
||||
return _Label_name[_Label_index[idx]:_Label_index[idx+1]]
|
||||
}
|
||||
|
||||
8
vendor/tailscale.com/net/sockstats/sockstats_tsgo.go
generated
vendored
8
vendor/tailscale.com/net/sockstats/sockstats_tsgo.go
generated
vendored
@@ -10,12 +10,12 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"tailscale.com/net/netmon"
|
||||
"tailscale.com/syncs"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/util/clientmetric"
|
||||
"tailscale.com/version"
|
||||
@@ -40,7 +40,7 @@ var sockStats = struct {
|
||||
// mu protects fields in this group (but not the fields within
|
||||
// sockStatCounters). It should not be held in the per-read/write
|
||||
// callbacks.
|
||||
mu sync.Mutex
|
||||
mu syncs.Mutex
|
||||
countersByLabel map[Label]*sockStatCounters
|
||||
knownInterfaces map[int]string // interface index -> name
|
||||
usedInterfaces map[int]int // set of interface indexes
|
||||
@@ -271,10 +271,10 @@ func setNetMon(netMon *netmon.Monitor) {
|
||||
}
|
||||
|
||||
netMon.RegisterChangeCallback(func(delta *netmon.ChangeDelta) {
|
||||
if !delta.Major {
|
||||
if !delta.RebindLikelyRequired {
|
||||
return
|
||||
}
|
||||
state := delta.New
|
||||
state := delta.CurrentState()
|
||||
ifName := state.DefaultRouteInterface
|
||||
if ifName == "" {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user