diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-04-21 22:01:56 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-04-21 22:04:11 +0400 |
commit | 88b01cc61f8cbd41162041da7bf206eca7e04b2f (patch) | |
tree | 5cb9d64fb9ec05c2f3956bbccbee9e1660c616af /accel-pppd/ctrl/pptp/pptp.c | |
parent | 3b3aa52ec2b316f8c5ee1593ca11ce1f437828e6 (diff) | |
download | accel-ppp-88b01cc61f8cbd41162041da7bf206eca7e04b2f.tar.gz accel-ppp-88b01cc61f8cbd41162041da7bf206eca7e04b2f.zip |
implemented per CTRL mppe config
Diffstat (limited to 'accel-pppd/ctrl/pptp/pptp.c')
-rw-r--r-- | accel-pppd/ctrl/pptp/pptp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index e0875d6f..456b85a4 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -58,6 +58,8 @@ static int conf_timeout = 5; static int conf_echo_interval = 0; static int conf_echo_failure = 3; static int conf_verbose = 0; +static int conf_mppe = MPPE_UNSET; + static mempool_t conn_pool; static unsigned int stat_starting; @@ -668,6 +670,7 @@ static int pptp_connect(struct triton_md_handler_t *h) conn->ctrl.max_mtu = PPTP_MAX_MTU; conn->ctrl.type = CTRL_TYPE_PPTP; conn->ctrl.name = "pptp"; + conn->ctrl.mppe = conf_mppe; conn->ctrl.calling_station_id = _malloc(17); conn->ctrl.called_station_id = _malloc(17); @@ -739,6 +742,19 @@ static void load_config(void) opt = conf_get_opt("pptp", "verbose"); if (opt && atoi(opt) > 0) conf_verbose = 1; + + conf_mppe = MPPE_UNSET; + opt = conf_get_opt("pptp", "mppe"); + if (opt) { + if (strcmp(opt, "deny") == 0) + conf_mppe = MPPE_DENY; + else if (strcmp(opt, "allow") == 0) + conf_mppe = MPPE_ALLOW; + else if (strcmp(opt, "prefer") == 0) + conf_mppe = MPPE_PREFER; + else if (strcmp(opt, "require") == 0) + conf_mppe = MPPE_REQUIRE; + } } static void pptp_init(void) |