diff options
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r-- | usr.sbin/ppp/chap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c index 07e69c1..1eec6c3 100644 --- a/usr.sbin/ppp/chap.c +++ b/usr.sbin/ppp/chap.c @@ -682,12 +682,13 @@ chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) switch (chap->auth.in.hdr.code) { case CHAP_CHALLENGE: - if (*bundle->cfg.auth.key == '!') + if (*bundle->cfg.auth.key == '!' && bundle->cfg.auth.key[1] != '!') chap_StartChild(chap, bundle->cfg.auth.key + 1, bundle->cfg.auth.name); else - chap_Respond(chap, bundle->cfg.auth.name, - bundle->cfg.auth.key, p->link.lcp.his_authtype + chap_Respond(chap, bundle->cfg.auth.name, bundle->cfg.auth.key + + (*bundle->cfg.auth.key == '!' ? 1 : 0), + p->link.lcp.his_authtype #ifdef HAVE_DES , lanman #endif |