X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=95b13b33572f2cd5120dc1c927e8670bae77137c;hb=a3630de20e34796f434a728bfd9cf1a961380c82;hp=dbf100de476c5f8d2004027259f2eddc8eef2414;hpb=8592783058509b5493a42f3b0432fcbaab55c994;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index dbf100d..95b13b3 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -17,9 +17,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = "$Id: lcp.c,v 1.39 1999/05/12 06:19:47 paulus Exp $"; -#endif +#define RCSID "$Id: lcp.c,v 1.44 1999/08/13 06:46:14 paulus Exp $"; /* * TODO: @@ -35,6 +33,8 @@ static char rcsid[] = "$Id: lcp.c,v 1.39 1999/05/12 06:19:47 paulus Exp $"; #include "chap.h" #include "magic.h" +static const char rcsid[] = RCSID; + /* * LCP-related command-line options. */ @@ -64,7 +64,7 @@ static option_t lcp_option_list[] = { { "-as", o_uint32, &lcp_wantoptions[0].asyncmap, "Set asyncmap (for received packets)", OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, - { "nomagicnumber", o_bool, &lcp_wantoptions[0].neg_magicnumber, + { "nomagic", o_bool, &lcp_wantoptions[0].neg_magicnumber, "Disable magic number negotiation (looped-back line detection)", OPT_A2COPY, &lcp_allowoptions[0].neg_magicnumber }, { "-mn", o_bool, &lcp_wantoptions[0].neg_magicnumber, @@ -1056,6 +1056,7 @@ lcp_nakci(f, p, len) if (++try.numloops >= lcp_loopbackfail) { notice("Serial line is looped back."); lcp_close(f->unit, "Loopback detected"); + status = EXIT_LOOPBACK; } } else try.numloops = 0; @@ -1818,6 +1819,8 @@ LcpEchoCheck (f) fsm *f; { LcpSendEchoRequest (f); + if (f->state != OPENED) + return; /* * Start the timer for the next interval.