]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/chap.c
Make authentication success/failure messages uniform.
[ppp.git] / pppd / chap.c
index c295bb360864520b2d98e06d27f21ed2f66ec175..85c860fc6816f1c85fd95cec806fb0bed2cdcc54 100644 (file)
@@ -33,7 +33,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: chap.c,v 1.32 2002/05/21 17:26:49 dfs Exp $"
+#define RCSID  "$Id: chap.c,v 1.34 2002/10/11 22:11:13 fcusack Exp $"
 
 /*
  * TODO:
@@ -500,7 +500,6 @@ ChapReceiveChallenge(cstate, inp, id, len)
     case CHAP_MICROSOFT:
        ChapMS(cstate, rchallenge, secret, secret_len,
               (MS_ChapResponse *) cstate->response);
-       cstate->resp_length = MS_CHAP_RESPONSE_LEN;
        break;
 
     case CHAP_MICROSOFT_V2:
@@ -509,7 +508,6 @@ ChapReceiveChallenge(cstate, inp, id, len)
                cstate->resp_name, secret, secret_len,
                (MS_Chap2Response *) cstate->response, cstate->earesponse,
                 MS_CHAP2_AUTHENTICATEE);
-       cstate->resp_length = MS_CHAP2_RESPONSE_LEN;
        break;
 #endif /* CHAPMS */
 
@@ -702,7 +700,7 @@ ChapReceiveResponse(cstate, inp, id, len)
        notice("CHAP peer authentication succeeded for %q", rhostname);
 
     } else {
-       error("CHAP peer authentication failed for remote host %q", rhostname);
+       error("CHAP peer authentication failed for %q", rhostname);
        cstate->serverstate = CHAPSS_BADAUTH;
        auth_peer_fail(cstate->unit, PPP_CHAP);
     }
@@ -770,6 +768,7 @@ ChapReceiveSuccess(cstate, inp, id, len)
 
     cstate->clientstate = CHAPCS_OPEN;
 
+    notice("CHAP authentication succeeded");
     auth_withpeer_success(cstate->unit, PPP_CHAP, cstate->resp_type);
 }