diff options
author | joshd <joshd@cvs.openbsd.org> | 1996-07-20 12:02:16 +0000 |
---|---|---|
committer | joshd <joshd@cvs.openbsd.org> | 1996-07-20 12:02:16 +0000 |
commit | d1ca06e9f2af777503835fcef79a3827eef02cd2 (patch) | |
tree | 0a8b89f672dd48513d85694a0f63e93191380c82 /usr.sbin/pppd/fsm.c | |
parent | b9db315696088975891987c416c6eafdbed087eb (diff) |
Update pppd to 2.3a4:
Add redo option error-reporting, add PAM, add microsoft compatibility
kludges, bzero stuff at important places, add one or two options
other generic enhancements. From: Paul.Mackerras@cs.anu.edu.au
Diffstat (limited to 'usr.sbin/pppd/fsm.c')
-rw-r--r-- | usr.sbin/pppd/fsm.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/usr.sbin/pppd/fsm.c b/usr.sbin/pppd/fsm.c index 1347659263a..af467df0807 100644 --- a/usr.sbin/pppd/fsm.c +++ b/usr.sbin/pppd/fsm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsm.c,v 1.2 1996/03/25 15:55:38 niklas Exp $ */ +/* $OpenBSD: fsm.c,v 1.3 1996/07/20 12:02:08 joshd Exp $ */ /* * fsm.c - {Link, IP} Control Protocol Finite State Machine. @@ -20,7 +20,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsm.c,v 1.2 1996/03/25 15:55:38 niklas Exp $"; +static char rcsid[] = "$OpenBSD: fsm.c,v 1.3 1996/07/20 12:02:08 joshd Exp $"; #endif /* @@ -43,7 +43,7 @@ static void fsm_timeout __P((caddr_t)); static void fsm_rconfreq __P((fsm *, int, u_char *, int)); static void fsm_rconfack __P((fsm *, int, u_char *, int)); static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int)); -static void fsm_rtermreq __P((fsm *, int)); +static void fsm_rtermreq __P((fsm *, int, u_char *, int)); static void fsm_rtermack __P((fsm *)); static void fsm_rcoderej __P((fsm *, u_char *, int)); static void fsm_sconfreq __P((fsm *, int)); @@ -349,7 +349,7 @@ fsm_input(f, inpacket, l) break; case TERMREQ: - fsm_rtermreq(f, id); + fsm_rtermreq(f, id, inp, len); break; case TERMACK: @@ -566,10 +566,14 @@ fsm_rconfnakrej(f, code, id, inp, len) * fsm_rtermreq - Receive Terminate-Req. */ static void -fsm_rtermreq(f, id) +fsm_rtermreq(f, id, p, len) fsm *f; int id; + u_char *p; + int len; { + char str[80]; + FSMDEBUG((LOG_INFO, "fsm_rtermreq(%s): Rcvd id %d.", PROTO_NAME(f), id)); @@ -580,7 +584,11 @@ fsm_rtermreq(f, id) break; case OPENED: - syslog(LOG_INFO, "%s terminated at peer's request", PROTO_NAME(f)); + if (len > 0) { + fmtmsg(str, sizeof(str), "%0.*v", len, p); + syslog(LOG_INFO, "%s terminated by peer (%s)", PROTO_NAME(f), str); + } else + syslog(LOG_INFO, "%s terminated by peer", PROTO_NAME(f)); if (f->callbacks->down) (*f->callbacks->down)(f); /* Inform upper layers */ f->retransmits = 0; |