diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-05-17 22:00:40 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-05-17 22:00:40 +0400 |
commit | 3cbee16f1ae968ae80d7e8fbe6a4359a901b3f40 (patch) | |
tree | b62909f37e23498c465b66faa3336066708ad84a /accel-pppd | |
parent | 051ba122f086076db5dab8ea15532d9d89b58cdc (diff) | |
download | accel-ppp-3cbee16f1ae968ae80d7e8fbe6a4359a901b3f40.tar.gz accel-ppp-3cbee16f1ae968ae80d7e8fbe6a4359a901b3f40.zip |
ppp: delay IPCP acknowledge until CCP brings up
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ppp/ipcp_opt_ipaddr.c | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp.h | 1 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ppp/ipcp_opt_ipaddr.c b/accel-pppd/ppp/ipcp_opt_ipaddr.c index b2a74caf..ed0de517 100644 --- a/accel-pppd/ppp/ipcp_opt_ipaddr.c +++ b/accel-pppd/ppp/ipcp_opt_ipaddr.c @@ -133,7 +133,7 @@ static int ipaddr_recv_conf_req(struct ppp_ipcp_t *ipcp, struct ipcp_option_t *o if (ipaddr_opt->ip->peer_addr == opt32->val) { ipcp->ppp->ipaddr = ipaddr_opt->ip->addr; ipcp->ppp->peer_ipaddr = ipaddr_opt->ip->peer_addr; - ipcp->delay_ack = !ipcp->started; + ipcp->delay_ack = !ipcp->ppp->ccp_started; return IPCP_OPT_ACK; } diff --git a/accel-pppd/ppp/ppp.h b/accel-pppd/ppp/ppp.h index 9d2409ed..4476f05a 100644 --- a/accel-pppd/ppp/ppp.h +++ b/accel-pppd/ppp/ppp.h @@ -103,6 +103,7 @@ struct ppp_t int terminating:1; int terminated:1; int terminate_cause; + int ccp_started:1; void *buf; int buf_size; diff --git a/accel-pppd/ppp/ppp_ccp.c b/accel-pppd/ppp/ppp_ccp.c index a8b813d5..f0334e84 100644 --- a/accel-pppd/ppp/ppp_ccp.c +++ b/accel-pppd/ppp/ppp_ccp.c @@ -133,6 +133,7 @@ int ccp_layer_start(struct ppp_layer_data_t *ld) log_ppp_debug("ccp_layer_start\n"); if (list_empty(&ccp->options) || !conf_ccp) { + ccp->ppp->ccp_started = 1; ppp_layer_started(ccp->ppp, &ccp->ld); return 0; } @@ -183,6 +184,7 @@ static void ccp_layer_up(struct ppp_fsm_t *fsm) if (!ccp->started) { log_ppp_debug("ccp_layer_started\n"); ccp->started = 1; + ccp->ppp->ccp_started = 1; if (ccp_set_flags(ccp->ppp->unit_fd, 1, 1)) { ppp_terminate(ccp->ppp, TERM_NAS_ERROR, 0); return; |