From: Paul Mackerras Date: Tue, 6 Jun 1995 01:52:25 +0000 (+0000) Subject: Minor mods from ppp-new version: request 12-bit BSD-compress by default, X-Git-Tag: RELEASE_2_3_6~673 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=fcdd79cf516672a47a3dd24b8e01071763f62110 Minor mods from ppp-new version: request 12-bit BSD-compress by default, better magic number initialization. --- diff --git a/pppd/ccp.c b/pppd/ccp.c index 0ecfc97..23fee58 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ccp.c,v 1.9 1995/05/19 03:17:09 paulus Exp $"; +static char rcsid[] = "$Id: ccp.c,v 1.10 1995/06/06 01:52:23 paulus Exp $"; #endif #include @@ -109,6 +109,7 @@ ccp_init(unit) memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options)); memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options)); + ccp_wantoptions[0].bsd_compress = 1; ccp_wantoptions[0].bsd_bits = 12; /* default value */ ccp_allowoptions[0].bsd_compress = 1; diff --git a/pppd/magic.c b/pppd/magic.c index 7391b14..4797f0b 100644 --- a/pppd/magic.c +++ b/pppd/magic.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: magic.c,v 1.4 1995/04/24 05:57:01 paulus Exp $"; +static char rcsid[] = "$Id: magic.c,v 1.5 1995/06/06 01:52:25 paulus Exp $"; #endif #include @@ -39,14 +39,17 @@ extern void srand48 __P((long)); * magic_init - Initialize the magic number generator. * * Attempts to compute a random number seed which will not repeat. - * The current method uses the current hostid and current time, currently. + * The current method uses the current hostid, current process ID + * and current time, currently. */ void magic_init() { long seed; + struct timeval t; - seed = gethostid() ^ time(NULL); + gettimeofday(&t, NULL); + seed = gethostid() ^ t.tv_sec ^ t.tv_usec ^ getpid(); srand48(seed); }