/[lwip]/lwip/src/netif/ppp/chap.c
ViewVC logotype

Diff of /lwip/src/netif/ppp/chap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jani, Fri May 30 08:49:34 2003 UTC revision 1.3 by likewise, Fri Nov 14 14:56:31 2003 UTC
# Line 245  static void ChapChallengeTimeout(void *a Line 245  static void ChapChallengeTimeout(void *a
245                    
246          if (cstate->chal_transmits >= cstate->max_transmits) {          if (cstate->chal_transmits >= cstate->max_transmits) {
247                  /* give up on peer */                  /* give up on peer */
248                  ppp_trace(LOG_ERR, "Peer failed to respond to CHAP challenge\n");                  CHAPDEBUG((LOG_ERR, "Peer failed to respond to CHAP challenge\n"));
249                  cstate->serverstate = CHAPSS_BADAUTH;                  cstate->serverstate = CHAPSS_BADAUTH;
250                  auth_peer_fail(cstate->unit, PPP_CHAP);                  auth_peer_fail(cstate->unit, PPP_CHAP);
251                  return;                  return;
# Line 405  static void ChapInput(int unit, u_char * Line 405  static void ChapInput(int unit, u_char *
405                  break;                  break;
406                    
407          default:                                /* Need code reject? */          default:                                /* Need code reject? */
408                  ppp_trace(LOG_WARNING, "Unknown CHAP code (%d) received.\n", code);                  CHAPDEBUG((LOG_WARNING, "Unknown CHAP code (%d) received.\n", code));
409                  break;                  break;
410          }          }
411  }  }
# Line 466  static void ChapReceiveChallenge(chap_st Line 466  static void ChapReceiveChallenge(chap_st
466          if (!get_secret(cstate->unit, cstate->resp_name, rhostname,          if (!get_secret(cstate->unit, cstate->resp_name, rhostname,
467                              secret, &secret_len, 0)) {                              secret, &secret_len, 0)) {
468                  secret_len = 0;         /* assume null secret if can't find one */                  secret_len = 0;         /* assume null secret if can't find one */
469                  ppp_trace(LOG_WARNING, "No CHAP secret found for authenticating us to %s\n", rhostname);                  CHAPDEBUG((LOG_WARNING, "No CHAP secret found for authenticating us to %s\n", rhostname));
470          }          }
471                    
472          /* cancel response send timeout if necessary */          /* cancel response send timeout if necessary */
# Line 576  static void ChapReceiveResponse(chap_sta Line 576  static void ChapReceiveResponse(chap_sta
576          if (!get_secret(cstate->unit, rhostname, cstate->chal_name,          if (!get_secret(cstate->unit, rhostname, cstate->chal_name,
577          secret, &secret_len, 1)) {          secret, &secret_len, 1)) {
578  /*        CHAPDEBUG((LOG_WARNING, TL_CHAP, "No CHAP secret found for authenticating %s\n", rhostname)); */  /*        CHAPDEBUG((LOG_WARNING, TL_CHAP, "No CHAP secret found for authenticating %s\n", rhostname)); */
579                  ppp_trace(LOG_WARNING, "No CHAP secret found for authenticating %s\n",                  CHAPDEBUG((LOG_WARNING, "No CHAP secret found for authenticating %s\n",
580                  rhostname);                  rhostname));
581          } else {          } else {
582                    
583                  /*  generate MD based on negotiated type */                  /*  generate MD based on negotiated type */
# Line 614  static void ChapReceiveResponse(chap_sta Line 614  static void ChapReceiveResponse(chap_sta
614                  if (cstate->chal_interval != 0)                  if (cstate->chal_interval != 0)
615                          TIMEOUT(ChapRechallenge, cstate, cstate->chal_interval);                          TIMEOUT(ChapRechallenge, cstate, cstate->chal_interval);
616          } else {          } else {
617                  ppp_trace(LOG_ERR, "CHAP peer authentication failed\n");                  CHAPDEBUG((LOG_ERR, "CHAP peer authentication failed\n"));
618                  cstate->serverstate = CHAPSS_BADAUTH;                  cstate->serverstate = CHAPSS_BADAUTH;
619                  auth_peer_fail(cstate->unit, PPP_CHAP);                  auth_peer_fail(cstate->unit, PPP_CHAP);
620          }          }
# Line 675  static void ChapReceiveFailure(chap_stat Line 675  static void ChapReceiveFailure(chap_stat
675          if (len > 0)          if (len > 0)
676                  PRINTMSG(inp, len);                  PRINTMSG(inp, len);
677                    
678          ppp_trace(LOG_ERR, "CHAP authentication failed\n");          CHAPDEBUG((LOG_ERR, "CHAP authentication failed\n"));
679          auth_withpeer_fail(cstate->unit, PPP_CHAP);          auth_withpeer_fail(cstate->unit, PPP_CHAP);
680  }  }
681    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26