Subject: Re: pppd says line is loopbacked
To: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
From: John F. Woods <jfw@funhouse.com>
List: port-i386
Date: 05/27/1996 09:08:32
> >I'm using pppd in client-mode to talk to a Linux box.  Apparently all
> >the LCPs sometimes get echoed back with the same magic number.
> I would suspect Linux, then.

No, suspect code reuse and accurate clocks.

The PPP LCP code, which is common to both Linux and NetBSD, calculates a
"random" magic number by glueing together the "hostid", the time of day,
and the process ID.  If you don't set your host id, it's zero (I didn't even
know I needed to set it, I'll go decorate /etc/rc.local with that right away);
it seems odd that the time would synchonize to the microsecond (or even to
the microsecond-increment), but all that really has to happen is for the
value tv_usec ^ getpid() to come out the same.  Since all future attempts
at LCP magic numbers are derived from a pseudo-random number generator without
further host-dependant input, once they lock, they stay locked.

Try setting your hostid with sysctl, and I bet the frequency of occurrance will
drop markedly.