Page MenuHomeFreeBSD

ip6_randomflowlabel: Avoid blocking if random(4) is not available

Authored by cem on Apr 22 2019, 4:17 PM.



If kern.random.initial_seeding.bypass_before_seeding is disabled, random(4)
and arc4random(9) will block indefinitely until enough entropy is available
to initially seed Fortuna.

It seems that zero flowids are perfectly valid, so avoid blocking on random
until initial seeding takes place.

Test Plan

This is a reduced version of D19973 for just the flowlabels, which don't need
the hacked up RNG and can just emit zero early on.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem created this revision.Apr 22 2019, 4:17 PM
thj accepted this revision.Apr 23 2019, 7:47 AM
This revision is now accepted and ready to land.Apr 23 2019, 7:47 AM
This revision was automatically updated to reflect the committed changes.