diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-05-25 18:46:24 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-25 18:46:24 +0000 |
commit | 6f34ae308865ce8877797e9b2501a85195c42d7d (patch) | |
tree | 3e87cf9c767fad3102fa2745e9837ecae61144e1 /pkg/tcpip/network | |
parent | f999672498925fab3beb201740c1a3dd0a1c6763 (diff) | |
parent | b8052176db03f5d357ca50adf1e90cfecccbc001 (diff) |
Merge release-20210518.0-37-gb8052176d (automated)
Diffstat (limited to 'pkg/tcpip/network')
-rw-r--r-- | pkg/tcpip/network/ipv6/ipv6.go | 1 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv6/ndp.go | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pkg/tcpip/network/ipv6/ipv6.go b/pkg/tcpip/network/ipv6/ipv6.go index 68f8308f2..35d125a53 100644 --- a/pkg/tcpip/network/ipv6/ipv6.go +++ b/pkg/tcpip/network/ipv6/ipv6.go @@ -184,7 +184,6 @@ type endpoint struct { nic stack.NetworkInterface dispatcher stack.TransportDispatcher protocol *protocol - stack *stack.Stack stats sharedStats // enabled is set to 1 when the endpoint is enabled and 0 when it is diff --git a/pkg/tcpip/network/ipv6/ndp.go b/pkg/tcpip/network/ipv6/ndp.go index 11ff36561..7af5e6975 100644 --- a/pkg/tcpip/network/ipv6/ndp.go +++ b/pkg/tcpip/network/ipv6/ndp.go @@ -16,7 +16,6 @@ package ipv6 import ( "fmt" - "math/rand" "time" "gvisor.dev/gvisor/pkg/sync" @@ -1718,7 +1717,7 @@ func (ndp *ndpState) startSolicitingRouters() { // 4861 section 6.3.7. var delay time.Duration if ndp.configs.MaxRtrSolicitationDelay > 0 { - delay = time.Duration(rand.Int63n(int64(ndp.configs.MaxRtrSolicitationDelay))) + delay = time.Duration(ndp.ep.protocol.stack.Rand().Int63n(int64(ndp.configs.MaxRtrSolicitationDelay))) } // Protected by ndp.ep.mu. @@ -1861,7 +1860,7 @@ func (ndp *ndpState) init(ep *endpoint, dadOptions ip.DADOptions) { header.InitialTempIID(ndp.temporaryIIDHistory[:], ndp.ep.protocol.options.TempIIDSeed, ndp.ep.nic.ID()) if MaxDesyncFactor != 0 { - ndp.temporaryAddressDesyncFactor = time.Duration(rand.Int63n(int64(MaxDesyncFactor))) + ndp.temporaryAddressDesyncFactor = time.Duration(ep.protocol.stack.Rand().Int63n(int64(MaxDesyncFactor))) } } |