summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/udp
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-05-26 18:13:05 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-26 18:15:43 -0700
commit097efe81a19a6ee11738957a3091e99a2caa46d4 (patch)
treed37d778e7379f9a463ec29232cc2ff737bee4284 /pkg/tcpip/transport/udp
parent522ae2dd1f3c0d5aea52a9883cc1319e3b1ebce4 (diff)
Use the stack RNG everywhere
...except in tests. Note this replaces some uses of a cryptographic RNG with a plain RNG. PiperOrigin-RevId: 376070666
Diffstat (limited to 'pkg/tcpip/transport/udp')
-rw-r--r--pkg/tcpip/transport/udp/endpoint.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go
index 83b589d09..b964e446b 100644
--- a/pkg/tcpip/transport/udp/endpoint.go
+++ b/pkg/tcpip/transport/udp/endpoint.go
@@ -1077,7 +1077,7 @@ func (e *endpoint) registerWithStack(netProtos []tcpip.NetworkProtocolNumber, id
BindToDevice: bindToDevice,
Dest: tcpip.FullAddress{},
}
- port, err := e.stack.ReservePort(portRes, nil /* testPort */)
+ port, err := e.stack.ReservePort(e.stack.Rand(), portRes, nil /* testPort */)
if err != nil {
return id, bindToDevice, err
}