diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-08-03 16:35:00 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-08-03 16:35:00 +0400 |
commit | 3dad610b772ba53eb2c50baa7b2760c65de94213 (patch) | |
tree | b749d9435e6a74ddffdd59c58d7e3b21097229aa | |
parent | 8b6ea70a163d0cfc84394a7241a4dad8a0bf2051 (diff) | |
download | accel-ppp-3dad610b772ba53eb2c50baa7b2760c65de94213.tar.gz accel-ppp-3dad610b772ba53eb2c50baa7b2760c65de94213.zip |
ppp: don't drop connection when mppe=prefer and user rejects ccp
-rw-r--r-- | accel-pppd/ppp/ccp_mppe.c | 3 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ppp/ccp_mppe.c b/accel-pppd/ppp/ccp_mppe.c index 388e2f6c..570bbdfb 100644 --- a/accel-pppd/ppp/ccp_mppe.c +++ b/accel-pppd/ppp/ccp_mppe.c @@ -79,6 +79,9 @@ static struct ccp_option_t *mppe_init(struct ppp_ccp_t *ccp) if (mppe == MPPE_REQUIRE || mppe == MPPE_PREFER) ccp->ld.passive = 0; + if (mppe == MPPE_REQUIRE) + ccp->ld.optional = 0; + mppe_opt->opt.id = CI_MPPE; mppe_opt->opt.len = 6; diff --git a/accel-pppd/ppp/ppp_ccp.c b/accel-pppd/ppp/ppp_ccp.c index 87ce857a..1d8acca6 100644 --- a/accel-pppd/ppp/ppp_ccp.c +++ b/accel-pppd/ppp/ppp_ccp.c @@ -731,7 +731,7 @@ static void ccp_recv_proto_rej(struct ppp_handler_t *h) { struct ppp_ccp_t *ccp = container_of(h, typeof(*ccp), hnd); - if (!ccp->ld.passive) { + if (!ccp->ld.optional) { ppp_terminate(ccp->ppp, TERM_USER_ERROR, 0); return; } |