summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp_lcp.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-08-23 18:27:31 +0400
committerKozlov Dmitry <dima@server>2010-08-23 18:33:09 +0400
commit9e52c15995a90fff71087cda4bb0c600b1d1d28d (patch)
treeac49c8cc0eeba2d2a0833b68d5809fd568ef7560 /accel-pptpd/ppp_lcp.c
parent18d93f51ef96af6a6779c3880ff5d06f49467cc4 (diff)
downloadaccel-ppp-9e52c15995a90fff71087cda4bb0c600b1d1d28d.tar.gz
accel-ppp-9e52c15995a90fff71087cda4bb0c600b1d1d28d.zip
implemented chap authentication
fixed auth type selection when configure-nak received
Diffstat (limited to 'accel-pptpd/ppp_lcp.c')
-rw-r--r--accel-pptpd/ppp_lcp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/accel-pptpd/ppp_lcp.c b/accel-pptpd/ppp_lcp.c
index b9d0de3..dbc819a 100644
--- a/accel-pptpd/ppp_lcp.c
+++ b/accel-pptpd/ppp_lcp.c
@@ -436,8 +436,10 @@ static int lcp_recv_conf_ack(struct ppp_lcp_t *lcp,uint8_t *data,int size)
{
log_debug(" ");
lopt->h->print(log_debug,lopt,data);
- if (lopt->h->recv_conf_ack)
- lopt->h->recv_conf_ack(lcp,lopt,data);
+ if (!lopt->h->recv_conf_ack)
+ break;
+ if (lopt->h->recv_conf_ack(lcp,lopt,data))
+ res=-1;
break;
}
}
@@ -514,8 +516,10 @@ static void lcp_recv(struct ppp_handler_t*h)
ppp_terminate(lcp->ppp);
break;
case CONFACK:
- lcp_recv_conf_ack(lcp,(uint8_t*)(hdr+1),ntohs(hdr->len)-PPP_HDRLEN);
- ppp_fsm_recv_conf_ack(&lcp->fsm);
+ if (lcp_recv_conf_ack(lcp,(uint8_t*)(hdr+1),ntohs(hdr->len)-PPP_HDRLEN))
+ ppp_terminate(lcp->ppp);
+ else
+ ppp_fsm_recv_conf_ack(&lcp->fsm);
break;
case CONFNAK:
lcp_recv_conf_nak(lcp,(uint8_t*)(hdr+1),ntohs(hdr->len)-PPP_HDRLEN);