diff options
author | Zeling Feng <zeling@google.com> | 2021-08-26 17:42:15 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-26 17:44:25 -0700 |
commit | 1076702371fa02a36b70a6abf10dbec886742208 (patch) | |
tree | 46751695fca20db6045580b8cece550988a45911 /pkg | |
parent | a69f8c8d598bc75dc3c3adb2059eda263d5437c1 (diff) |
Add Stack.Seed() back
... because it is still used by fuchsia.
PiperOrigin-RevId: 393246904
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/tcpip/stack/stack.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go index 8e5c6edbf..cfa8a2e8f 100644 --- a/pkg/tcpip/stack/stack.go +++ b/pkg/tcpip/stack/stack.go @@ -1823,6 +1823,13 @@ func (s *Stack) SetNUDConfigurations(id tcpip.NICID, proto tcpip.NetworkProtocol return nic.setNUDConfigs(proto, c) } +// Seed returns a 32 bit value that can be used as a seed value. +// +// NOTE: The seed is generated once during stack initialization only. +func (s *Stack) Seed() uint32 { + return s.seed +} + // Rand returns a reference to a pseudo random generator that can be used // to generate random numbers as required. func (s *Stack) Rand() *rand.Rand { |