Page MenuHomeFreeBSD

D19972.1795482507.diff
No OneTemporary

Authored By
Unknown
Size
927 B
Referenced Files
None
Subscribers
None

D19972.1795482507.diff

Index: sys/netinet/in_pcb.c
===================================================================
--- sys/netinet/in_pcb.c
+++ sys/netinet/in_pcb.c
@@ -57,6 +57,7 @@
#include <sys/eventhandler.h>
#include <sys/domain.h>
#include <sys/protosw.h>
+#include <sys/random.h>
#include <sys/rmlock.h>
#include <sys/smp.h>
#include <sys/socket.h>
@@ -637,11 +638,13 @@
* For UDP(-Lite), use random port allocation as long as the user
* allows it. For TCP (and as of yet unknown) connections,
* use random port allocation only if the user allows it AND
- * ipport_tick() allows it.
+ * ipport_tick() allows it. Finally, if the random device is not yet
+ * available, don't try to draw a random number.
*/
if (V_ipport_randomized &&
(!V_ipport_stoprandom || pcbinfo == &V_udbinfo ||
- pcbinfo == &V_ulitecbinfo))
+ pcbinfo == &V_ulitecbinfo) &&
+ is_random_seeded())
dorandom = 1;
else
dorandom = 0;

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 24, 1:08 AM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41943746
Default Alt Text
D19972.1795482507.diff (927 B)

Event Timeline