diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-10-15 07:01:53 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-10-15 07:01:53 +0400 |
commit | b403bbb29ec63d127f91adbab956bad454564f0a (patch) | |
tree | 7f34968ddb08a334c078d9540aa5888eaa71ec99 /accel-pptpd | |
parent | cfabc95fbef19237057f42122898e7604307e1e7 (diff) | |
download | accel-ppp-b403bbb29ec63d127f91adbab956bad454564f0a.tar.gz accel-ppp-b403bbb29ec63d127f91adbab956bad454564f0a.zip |
fixed incorrect mppe negotiation
Diffstat (limited to 'accel-pptpd')
-rw-r--r-- | accel-pptpd/ppp/ccp_mppe.c | 10 | ||||
-rw-r--r-- | accel-pptpd/ppp/ppp_ccp.c | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/accel-pptpd/ppp/ccp_mppe.c b/accel-pptpd/ppp/ccp_mppe.c index 695e62d5..2f3e0836 100644 --- a/accel-pptpd/ppp/ccp_mppe.c +++ b/accel-pptpd/ppp/ccp_mppe.c @@ -159,10 +159,14 @@ static int mppe_recv_conf_req(struct ppp_ccp_t *ccp, struct ccp_option_t *opt, u } else return CCP_OPT_REJ; - if (setup_mppe_key(ccp->ppp->unit_fd, 1, mppe_opt->send_key)) - return CCP_OPT_REJ; + if (mppe_opt->mppe) { + if (setup_mppe_key(ccp->ppp->unit_fd, 1, mppe_opt->send_key)) + return CCP_OPT_REJ; + + decrease_mtu(ccp->ppp); - decrease_mtu(ccp->ppp); + log_ppp_debug(" (mppe enabled)"); + } return CCP_OPT_ACK; } diff --git a/accel-pptpd/ppp/ppp_ccp.c b/accel-pptpd/ppp/ppp_ccp.c index 613fb52c..de3270e3 100644 --- a/accel-pptpd/ppp/ppp_ccp.c +++ b/accel-pptpd/ppp/ppp_ccp.c @@ -400,8 +400,8 @@ static int ccp_recv_conf_req(struct ppp_ccp_t *ccp, uint8_t *data, int size) lopt->state = CCP_OPT_REJ; ropt->state = CCP_OPT_REJ; } else { - if (lopt->state == CCP_OPT_NAK && r == CCP_OPT_ACK) - ccp->need_req = 1; + /*if (lopt->state == CCP_OPT_NAK && r == CCP_OPT_ACK) + ccp->need_req = 1;*/ lopt->state = r; ropt->state = r; } @@ -514,7 +514,8 @@ static int ccp_recv_conf_nak(struct ppp_ccp_t *ccp, uint8_t *data, int size) } if (lopt->h->recv_conf_nak && lopt->h->recv_conf_nak(ccp, lopt, data)) res = -1; - lopt->state = CCP_OPT_NAK; + //lopt->state = CCP_OPT_NAK; + //ccp->need_req = 1; break; } } |