HomeFreeBSD

ndis(4): Better mimic the behavior of rand() on Windows.

Description

ndis(4): Better mimic the behavior of rand() on Windows.

In ndis(4) we expose a rand() function that was constantly reseeding
with a time depending function every time it was called. This
essentially broke the reasoning behind seeding, and rendered srand()
a no-op.

Keep it simple, just use random() and srandom() as it's meant to work.
It would have been tempting to just go for arc4random() but we
want to mimic Microsoft, and we don't need crypto-grade randomness
here.

PR: 209616
MFC after: 2 weeks

Details

Provenance
pfgAuthored on
Parents
rS300375: Adjust _ALIGNBYTES to the proper value for arm and armv6 arches. Modern
Branches
Unknown
Tags
Unknown