diff options
author | 1997-04-13 21:30:43 +0000 | |
---|---|---|
committer | 1997-04-13 21:30:43 +0000 | |
commit | 98fa2d1286822c83f69beb18ce7fc5ca14177fc3 (patch) | |
tree | 3ee00ff6cdcf0ce7122e4e50d87ad40ca890054b /lib/libc/net/res_init.c | |
parent | use special random number generator to create less predictable and non (diff) | |
download | wireguard-openbsd-98fa2d1286822c83f69beb18ce7fc5ca14177fc3.tar.xz wireguard-openbsd-98fa2d1286822c83f69beb18ce7fc5ca14177fc3.zip |
the before mentioned random number generator.
Diffstat (limited to 'lib/libc/net/res_init.c')
-rw-r--r-- | lib/libc/net/res_init.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index a16c47807f4..973fdd43bee 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_init.c,v 1.13 1997/04/05 21:13:17 millert Exp $ */ +/* $OpenBSD: res_init.c,v 1.14 1997/04/13 21:30:43 provos Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_init.c,v 1.13 1997/04/05 21:13:17 millert Exp $"; +static char rcsid[] = "$OpenBSD: res_init.c,v 1.14 1997/04/13 21:30:43 provos Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -185,13 +185,6 @@ res_init() if (!(_res.options & RES_INIT)) _res.options = RES_DEFAULT; - /* - * This one used to initialize implicitly to zero, so unless the app - * has set it to something in particular, we can randomize it now. - */ - if (!_res.id) - _res.id = res_randomid(); - #ifdef USELOOPBACK _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); #else @@ -510,9 +503,3 @@ net_mask(in) /* XXX - should really use system's version of this */ return (htonl(IN_CLASSC_NET)); } #endif - -u_int -res_randomid() -{ - return (0xffff & arc4random()); -} |