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)
Feb 11 2024, 9:14 AM
Unknown Object (File)
Dec 20 2023, 10:26 PM
Unknown Object (File)
Dec 20 2023, 7:55 AM
Unknown Object (File)
Dec 13 2023, 7:43 AM
Unknown Object (File)
Oct 29 2023, 9:31 PM
Unknown Object (File)
Sep 15 2023, 12:58 AM
Unknown Object (File)
Sep 1 2023, 9:31 PM
Unknown Object (File)
Aug 25 2023, 7:06 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