summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/nrand48.c
diff options
context:
space:
mode:
authortb <>2015-12-07 02:38:54 +0000
committertb <>2015-12-07 02:38:54 +0000
commit66850456c16cd20c8be8679ac67c8bfcebd685fc (patch)
treed9831e76399642a51694a54ec1ba8536d70a5cb9 /src/lib/libc/stdlib/nrand48.c
parent7c02a09f03cd870973f4bb074fbe0081dcdb674d (diff)
downloadopenbsd-66850456c16cd20c8be8679ac67c8bfcebd685fc.tar.gz
openbsd-66850456c16cd20c8be8679ac67c8bfcebd685fc.tar.bz2
openbsd-66850456c16cd20c8be8679ac67c8bfcebd685fc.zip
Get rid of modulo bias and replace the naive shuffle by the
Knuth-Fisher-Yates shuffle to make the random sequence of ports less biased. Based on the implementation in sys/netinet/ip_id.c. With helpful input from daniel@ and beck@ ok beck@ despite eye twitching
Diffstat (limited to 'src/lib/libc/stdlib/nrand48.c')
0 files changed, 0 insertions, 0 deletions