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, Nov 23, 2:52 PM
Unknown Object (File)
Sat, Nov 23, 11:57 AM
Unknown Object (File)
Fri, Nov 22, 8:05 AM
Unknown Object (File)
Oct 26 2024, 2:20 AM
Unknown Object (File)
Oct 25 2024, 5:43 AM
Unknown Object (File)
Oct 25 2024, 5:43 AM
Unknown Object (File)
Oct 25 2024, 5:42 AM
Unknown Object (File)
Oct 25 2024, 5:33 AM
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