]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r300376:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 4 Jun 2016 04:01:28 +0000 (04:01 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 4 Jun 2016 04:01:28 +0000 (04:01 +0000)
commit9d1fefce156b998f093d9861ac688bf3bc3f4c4e
treebab6c8d9a088abdfaa4110784c04a2eee2878c3e
parent6092d879505987c87a51448c07c1827eb6a8ebc7
MFC r300376:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/compat/ndis/subr_ntoskrnl.c