diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-31 14:05:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:29 -0500 |
commit | 18732ba952c576c890e2fa79f9e164ae51dd320a (patch) | |
tree | 9e508099372a6f6e8336a4db8054dd110fb0a8a1 /source4/nbt_server/wins | |
parent | 3d409a43f468bb118ddf8467fb81a5ce2e7fb68e (diff) | |
download | samba-18732ba952c576c890e2fa79f9e164ae51dd320a.tar.gz samba-18732ba952c576c890e2fa79f9e164ae51dd320a.tar.bz2 samba-18732ba952c576c890e2fa79f9e164ae51dd320a.zip |
r21086: add some notes
metze
(This used to be commit dfbdb958419a041c1aff039810f7e9cb4320ec2c)
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r-- | source4/nbt_server/wins/winsserver.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c index 6b91f78ad0..072c646a92 100644 --- a/source4/nbt_server/wins/winsserver.c +++ b/source4/nbt_server/wins/winsserver.c @@ -642,6 +642,13 @@ static void nbtd_wins_randomize1Clist(const char **addresses, struct socket_addr /* * if we haven't found an address in the same subnet, search in ones * which match the client more + * + * some notes: + * + * it's not "idx = idx % r" but "idx = r % idx" + * because in "a % b" b is the allowed range + * and b-1 is the maximum possible result, so it must be decreasing + * and the above idx == 0 check breaks the while(1) loop. */ idx = r % idx; } |