summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ccp_mppe.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-04-22 15:48:29 +0400
committerKozlov Dmitry <dima@server>2011-04-22 15:48:29 +0400
commit00ee037764b65c8e45255f804745da76f5df3704 (patch)
treed4f5753e383cfc13655c088911d936a145af4418 /accel-pppd/ppp/ccp_mppe.c
parenta7e9e7002b8f54cbd0ff91b1017b9d789b48da53 (diff)
downloadaccel-ppp-00ee037764b65c8e45255f804745da76f5df3704.tar.gz
accel-ppp-00ee037764b65c8e45255f804745da76f5df3704.zip
ppp: introduced 'mppe' option
Diffstat (limited to 'accel-pppd/ppp/ccp_mppe.c')
-rw-r--r--accel-pppd/ppp/ccp_mppe.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/accel-pppd/ppp/ccp_mppe.c b/accel-pppd/ppp/ccp_mppe.c
index 436f710..21280c4 100644
--- a/accel-pppd/ppp/ccp_mppe.c
+++ b/accel-pppd/ppp/ccp_mppe.c
@@ -57,7 +57,7 @@ static struct ccp_option_t *mppe_init(struct ppp_ccp_t *ccp)
memset(mppe_opt, 0, sizeof(*mppe_opt));
mppe_opt->policy = conf_mppe;
if (conf_mppe)
- mppe_opt->mppe = conf_mppe;
+ mppe_opt->mppe = 1;
else
mppe_opt->mppe = -1;
mppe_opt->opt.id = CI_MPPE;
@@ -251,10 +251,16 @@ static void ev_mppe_keys(struct ev_mppe_keys_t *ev)
memcpy(mppe_opt->recv_key, ev->recv_key, 16);
memcpy(mppe_opt->send_key, ev->send_key, 16);
- //mppe_opt->policy = ev->policy;
+ mppe_opt->policy = ev->policy;
if (ev->policy == 2)
mppe_opt->mppe = 1;
+ else if (ev->policy == 1) {
+ if (conf_mppe == 1)
+ mppe_opt->mppe = 1;
+ else
+ mppe_opt->mppe = -1;
+ }
}
static void load_config(void)