summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/ppp/ppp_auth.c10
-rw-r--r--accel-pppd/ppp/ppp_lcp.c9
2 files changed, 19 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp_auth.c b/accel-pppd/ppp/ppp_auth.c
index 98675d37..1fb3bcf9 100644
--- a/accel-pppd/ppp/ppp_auth.c
+++ b/accel-pppd/ppp/ppp_auth.c
@@ -144,6 +144,16 @@ static int auth_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, u
struct auth_data_t *d;
int r;
+ if (auth_opt->started) {
+ if (!auth_opt->auth)
+ return LCP_OPT_REJ;
+
+ if (!ptr || ntohs(opt16->val) != auth_opt->auth->proto)
+ return LCP_OPT_NAK;
+
+ return LCP_OPT_ACK;
+ }
+
if (list_empty(&auth_opt->auth_list))
return LCP_OPT_REJ;
diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c
index 78a145af..58c21dcc 100644
--- a/accel-pppd/ppp/ppp_lcp.c
+++ b/accel-pppd/ppp/ppp_lcp.c
@@ -728,6 +728,9 @@ static void lcp_recv(struct ppp_handler_t*h)
if ((hdr->code == CONFACK || hdr->code == CONFNAK || hdr->code == CONFREJ) && hdr->id != lcp->fsm.id)
return;
+
+ if ((hdr->code == CONFACK || hdr->code == CONFNAK || hdr->code == CONFREJ) && lcp->started)
+ return;
if (lcp->fsm.fsm_state == FSM_Initial || lcp->fsm.fsm_state == FSM_Closed || (lcp->ppp->terminating && (hdr->code != TERMACK && hdr->code != TERMREQ))) {
/*if (conf_ppp_verbose)
@@ -741,6 +744,12 @@ static void lcp_recv(struct ppp_handler_t*h)
switch(hdr->code) {
case CONFREQ:
r = lcp_recv_conf_req(lcp, (uint8_t*)(hdr + 1), ntohs(hdr->len) - PPP_HDRLEN);
+ if (lcp->started) {
+ if (r == LCP_OPT_ACK)
+ send_conf_ack(&lcp->fsm);
+ else
+ r = LCP_OPT_FAIL;
+ }
switch(r) {
case LCP_OPT_ACK:
ppp_fsm_recv_conf_req_ack(&lcp->fsm);