Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102554638
D19972.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
927 B
Referenced Files
None
Subscribers
None
D19972.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 12:01 AM (9 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14635485
Default Alt Text
D19972.diff (927 B)
Attached To
Mode
D19972: in_pcb_lport: Don't attempt to randomize if random(4) is unavailable
Attached
Detach File
Event Timeline
Log In to Comment