Page MenuHomeFreeBSD

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

Authored by cem on Apr 22 2019, 4:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 26, 2:20 AM
Unknown Object (File)
Fri, Oct 25, 5:43 AM
Unknown Object (File)
Fri, Oct 25, 5:43 AM
Unknown Object (File)
Fri, Oct 25, 5:42 AM
Unknown Object (File)
Fri, Oct 25, 5:33 AM
Unknown Object (File)
Oct 5 2024, 3:13 AM
Unknown Object (File)
Oct 4 2024, 5:49 PM
Unknown Object (File)
Oct 4 2024, 1:47 PM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable