mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 19:51:41 +00:00
go.mod, wgengine/wgint: bump wireguard-go
For b51010ba13
Change-Id: Ibf767dfad98aef7e9f0505d91c0d26f924e046d5
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
f52a659076
commit
56f6fe204b
4
go.mod
4
go.mod
@ -63,9 +63,9 @@ require (
|
|||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
|
||||||
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11
|
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11
|
||||||
golang.org/x/tools v0.1.11
|
golang.org/x/tools v0.1.11
|
||||||
golang.zx2c4.com/wireguard v0.0.0-20220703234212-c31a7b1ab478
|
golang.zx2c4.com/wireguard v0.0.0-20220904105730-b51010ba13f0
|
||||||
golang.zx2c4.com/wireguard/windows v0.5.3
|
golang.zx2c4.com/wireguard/windows v0.5.3
|
||||||
gvisor.dev/gvisor v0.0.0-20220801230058-850e42eb4444
|
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
|
||||||
honnef.co/go/tools v0.4.0-0.dev.0.20220404092545-59d7a2877f83
|
honnef.co/go/tools v0.4.0-0.dev.0.20220404092545-59d7a2877f83
|
||||||
inet.af/peercred v0.0.0-20210906144145-0893ea02156a
|
inet.af/peercred v0.0.0-20210906144145-0893ea02156a
|
||||||
inet.af/wf v0.0.0-20220728202103-50d96caab2f6
|
inet.af/wf v0.0.0-20220728202103-50d96caab2f6
|
||||||
|
8
go.sum
8
go.sum
@ -1633,8 +1633,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
|
|||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY=
|
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY=
|
||||||
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
|
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
|
||||||
golang.zx2c4.com/wireguard v0.0.0-20220703234212-c31a7b1ab478 h1:vDy//hdR+GnROE3OdYbQKt9rdtNdHkDtONvpRwmls/0=
|
golang.zx2c4.com/wireguard v0.0.0-20220904105730-b51010ba13f0 h1:5ZkdpbduT/g+9OtbSDvbF3KvfQG45CtH/ppO8FUmvCQ=
|
||||||
golang.zx2c4.com/wireguard v0.0.0-20220703234212-c31a7b1ab478/go.mod h1:bVQfyl2sCM/QIIGHpWbFGfHPuDvqnCNkT6MQLTCjO/U=
|
golang.zx2c4.com/wireguard v0.0.0-20220904105730-b51010ba13f0/go.mod h1:enML0deDxY1ux+B6ANGiwtg0yAJi1rctkTpcHNAVPyg=
|
||||||
golang.zx2c4.com/wireguard/windows v0.5.3 h1:On6j2Rpn3OEMXqBq00QEDC7bWSZrPIHKIus8eIuExIE=
|
golang.zx2c4.com/wireguard/windows v0.5.3 h1:On6j2Rpn3OEMXqBq00QEDC7bWSZrPIHKIus8eIuExIE=
|
||||||
golang.zx2c4.com/wireguard/windows v0.5.3/go.mod h1:9TEe8TJmtwyQebdFwAkEWOPr3prrtqm+REGFifP60hI=
|
golang.zx2c4.com/wireguard/windows v0.5.3/go.mod h1:9TEe8TJmtwyQebdFwAkEWOPr3prrtqm+REGFifP60hI=
|
||||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||||
@ -1816,8 +1816,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
|
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
|
||||||
gvisor.dev/gvisor v0.0.0-20220801230058-850e42eb4444 h1:0d3ygmOM5RgQB8rmsZNeAY/7Q98fKt1HrGO2XIp4pDI=
|
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5 h1:cv/zaNV0nr1mJzaeo4S5mHIm5va1W0/9J3/5prlsuRM=
|
||||||
gvisor.dev/gvisor v0.0.0-20220801230058-850e42eb4444/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
|
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
@ -22,38 +22,28 @@ var (
|
|||||||
|
|
||||||
func getPeerStatsOffset(name string) uintptr {
|
func getPeerStatsOffset(name string) uintptr {
|
||||||
peerType := reflect.TypeOf(device.Peer{})
|
peerType := reflect.TypeOf(device.Peer{})
|
||||||
sf, ok := peerType.FieldByName("stats")
|
field, ok := peerType.FieldByName(name)
|
||||||
if !ok {
|
if !ok {
|
||||||
panic("no stats field in device.Peer")
|
panic("no " + name + " field in device.Peer")
|
||||||
}
|
}
|
||||||
if sf.Type.Kind() != reflect.Struct {
|
if s := field.Type.String(); s != "atomic.Int64" && s != "atomic.Uint64" {
|
||||||
panic("stats field is not a struct")
|
panic("unexpected type " + s + " of field " + name + " in device.Peer")
|
||||||
}
|
}
|
||||||
base := sf.Offset
|
return field.Offset
|
||||||
|
|
||||||
st := sf.Type
|
|
||||||
field, ok := st.FieldByName(name)
|
|
||||||
if !ok {
|
|
||||||
panic("no " + name + " field in device.Peer.stats")
|
|
||||||
}
|
|
||||||
if field.Type.Kind() != reflect.Int64 && field.Type.Kind() != reflect.Uint64 {
|
|
||||||
panic("unexpected kind of " + name + " field in device.Peer.stats")
|
|
||||||
}
|
|
||||||
return base + field.Offset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PeerLastHandshakeNano returns the last handshake time in nanoseconds since the
|
// PeerLastHandshakeNano returns the last handshake time in nanoseconds since the
|
||||||
// unix epoch.
|
// unix epoch.
|
||||||
func PeerLastHandshakeNano(peer *device.Peer) int64 {
|
func PeerLastHandshakeNano(peer *device.Peer) int64 {
|
||||||
return atomic.LoadInt64((*int64)(unsafe.Add(unsafe.Pointer(peer), offHandshake)))
|
return (*atomic.Int64)(unsafe.Add(unsafe.Pointer(peer), offHandshake)).Load()
|
||||||
}
|
}
|
||||||
|
|
||||||
// PeerRxBytes returns the number of bytes received from this peer.
|
// PeerRxBytes returns the number of bytes received from this peer.
|
||||||
func PeerRxBytes(peer *device.Peer) uint64 {
|
func PeerRxBytes(peer *device.Peer) uint64 {
|
||||||
return atomic.LoadUint64((*uint64)(unsafe.Add(unsafe.Pointer(peer), offRxBytes)))
|
return (*atomic.Uint64)(unsafe.Add(unsafe.Pointer(peer), offRxBytes)).Load()
|
||||||
}
|
}
|
||||||
|
|
||||||
// PeerTxBytes returns the number of bytes sent to this peer.
|
// PeerTxBytes returns the number of bytes sent to this peer.
|
||||||
func PeerTxBytes(peer *device.Peer) uint64 {
|
func PeerTxBytes(peer *device.Peer) uint64 {
|
||||||
return atomic.LoadUint64((*uint64)(unsafe.Add(unsafe.Pointer(peer), offTxBytes)))
|
return (*atomic.Uint64)(unsafe.Add(unsafe.Pointer(peer), offTxBytes)).Load()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user