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)
Mon, Apr 14, 11:54 AM
Unknown Object (File)
Mar 17 2025, 9:17 PM
Unknown Object (File)
Mar 13 2025, 3:32 AM
Unknown Object (File)
Feb 20 2025, 5:10 PM
Unknown Object (File)
Feb 18 2025, 12:45 PM
Unknown Object (File)
Feb 18 2025, 12:23 PM
Unknown Object (File)
Dec 4 2024, 3:48 PM
Unknown Object (File)
Dec 4 2024, 3:48 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23822
Build 22762: arc lint + arc unit