The interminable rework of afs_random() 59/13759/3
authorBenjamin Kaduk <kaduk@mit.edu>
Fri, 9 Aug 2019 14:59:44 +0000 (07:59 -0700)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 13 Sep 2019 13:43:07 +0000 (09:43 -0400)
commit1c4e94da2a8fce9d79006ad6d6673d3d7de117d3
treefb891da71a11e197fbd43e0780a5a5ad4b82060b
parent276bd5c7f8a2ec7673d2ad084566203eb2055938
The interminable rework of afs_random()

Commit f0a3d477d6109697645cfdcc17617b502349d91b restructured the
operation on tv_usec to avoid using undefined behavior, but in
the process introduced a behavior change.  Historically (at least as
far back as AFS-3.3), we masked off the low nybble (four bits) of
tv_usec before adding the low byte (eight bits) of the rxi_getaddr()
output.  Why there was a desire to combine two sources of input for
the overlapping four bits remains unclear, but restore the historical
behavior for now, as the intent of commit
f0a3d477d6109697645cfdcc17617b502349d91b was to not introduce any
behavior changes.

Change-Id: Icb8bc1edd34ca29c3094b976436177b18bfc8d1d
Reviewed-on: https://gerrit.openafs.org/13759
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_server.c