X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=0a192924c6a34e911fa7c9728e89a1de1e461b45;hb=33c08b5f78f41aab4d1172e66db7c1afe21b5f1c;hp=d1be64f43b74e3ca68e9a09a4d80094281e8c46a;hpb=875d9641d05b4fcb7e186f784c801962bb2670e5;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index d1be64f..0a19292 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 const char rcsid[] = "$Id: lcp.c,v 1.43 1999/08/12 04:25:21 paulus Exp $"; -#endif +#define RCSID "$Id: lcp.c,v 1.46 1999/11/15 01:51:51 paulus Exp $"; /* * TODO: @@ -35,6 +33,8 @@ static const char rcsid[] = "$Id: lcp.c,v 1.43 1999/08/12 04:25:21 paulus Exp $" #include "chap.h" #include "magic.h" +static const char rcsid[] = RCSID; + /* * LCP-related command-line options. */ @@ -118,9 +118,9 @@ lcp_options lcp_allowoptions[NUM_PPP]; /* Options we allow peer to request */ lcp_options lcp_hisoptions[NUM_PPP]; /* Options that we ack'd */ u_int32_t xmit_accm[NUM_PPP][8]; /* extended transmit ACCM */ -static u_int32_t lcp_echos_pending = 0; /* Number of outstanding echo msgs */ -static u_int32_t lcp_echo_number = 0; /* ID number of next echo frame */ -static u_int32_t lcp_echo_timer_running = 0; /* set if a timer is running */ +static int lcp_echos_pending = 0; /* Number of outstanding echo msgs */ +static int lcp_echo_number = 0; /* ID number of next echo frame */ +static int lcp_echo_timer_running = 0; /* set if a timer is running */ static u_char nak_buffer[PPP_MRU]; /* where we construct a nak packet */ @@ -336,7 +336,7 @@ lcp_close(unit, reason) fsm *f = &lcp_fsm[unit]; if (phase != PHASE_DEAD) - phase = PHASE_TERMINATE; + new_phase(PHASE_TERMINATE); if (f->state == STOPPED && f->flags & (OPT_PASSIVE|OPT_SILENT)) { /* * This action is not strictly according to the FSM in RFC1548, @@ -457,7 +457,7 @@ lcp_rprotrej(f, inp, len) struct protent *protp; u_short prot; - if (len < sizeof (u_short)) { + if (len < 2) { LCPDEBUG(("lcp_rprotrej: Rcvd short Protocol-Reject packet!")); return; } @@ -1852,7 +1852,9 @@ LcpEchoTimeout (arg) static void lcp_received_echo_reply (f, id, inp, len) fsm *f; - int id; u_char *inp; int len; + int id; + u_char *inp; + int len; { u_int32_t magic;