summaryrefslogtreecommitdiffstats
path: root/sys/i4b
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i4b')
-rw-r--r--sys/i4b/driver/i4b_ispppsubr.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/i4b/driver/i4b_ispppsubr.c b/sys/i4b/driver/i4b_ispppsubr.c
index 7da2ea7..3e47912 100644
--- a/sys/i4b/driver/i4b_ispppsubr.c
+++ b/sys/i4b/driver/i4b_ispppsubr.c
@@ -1872,6 +1872,20 @@ sppp_open_event(const struct cp *cp, struct sppp *sp)
sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
break;
case STATE_STOPPED:
+ /*
+ * Try escaping stopped state. This seems to bite
+ * people occasionally, in particular for IPCP,
+ * presumably following previous IPCP negotiation
+ * aborts. Somehow, we must have missed a Down event
+ * which would have caused a transition into starting
+ * state, so as a bandaid we force the Down event now.
+ * This effectively implements (something like the)
+ * `restart' option mentioned in the state transition
+ * table of RFC 1661.
+ */
+ sppp_cp_change_state(cp, sp, STATE_STARTING);
+ (cp->tls)(sp);
+ break;
case STATE_STOPPING:
case STATE_REQ_SENT:
case STATE_ACK_RCVD:
@@ -3774,8 +3788,8 @@ sppp_pap_input(struct sppp *sp, struct mbuf *m)
sppp_print_string((char*)passwd, passwd_len);
log(-1, ">\n");
}
- if (name_len > AUTHNAMELEN ||
- passwd_len > AUTHKEYLEN ||
+ if (name_len != sppp_strnlen(sp->hisauth.name, AUTHNAMELEN) ||
+ passwd_len != sppp_strnlen(sp->hisauth.secret, AUTHKEYLEN) ||
bcmp(name, sp->hisauth.name, name_len) != 0 ||
bcmp(passwd, sp->hisauth.secret, passwd_len) != 0) {
/* action scn, tld */
OpenPOWER on IntegriCloud