Index: sys/netinet/in_pcb.c =================================================================== --- sys/netinet/in_pcb.c +++ sys/netinet/in_pcb.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -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;