From 2f3827537ad991a563f5378ced9bf45bb71db0df Mon Sep 17 00:00:00 2001 From: provos Date: Fri, 25 Apr 1997 07:43:05 +0000 Subject: [PATCH] skipped too many ids --- lib/libc/net/res_random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/net/res_random.c b/lib/libc/net/res_random.c index 2fead78e9c0..ebd1831e51b 100644 --- a/lib/libc/net/res_random.c +++ b/lib/libc/net/res_random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_random.c,v 1.4 1997/04/23 22:37:50 provos Exp $ */ +/* $OpenBSD: res_random.c,v 1.5 1997/04/25 07:43:05 provos Exp $ */ /* * Copyright 1997 Niels Provos @@ -189,7 +189,7 @@ res_randomid() tmp = arc4random(); /* Skip a random number of ids */ - n = tmp & 0x2f; tmp = tmp >> 6; + n = tmp & 0x7; tmp = tmp >> 3; if (ru_counter + n >= RU_MAX) res_initid(); -- 2.20.1