diff options
author | Kozlov Dmitry <dima@server> | 2010-11-09 13:21:32 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-11-09 13:21:32 +0300 |
commit | 605c797873ceee12a7eb3561d6e3e7682ded943b (patch) | |
tree | 9ef44fc047e53f370fc489e37d26e119c2b2ae03 /accel-pptpd/radius/radius.c | |
parent | d0130adf3aaca9fa3fee227a06f3e1cfcbf40784 (diff) | |
download | accel-ppp-605c797873ceee12a7eb3561d6e3e7682ded943b.tar.gz accel-ppp-605c797873ceee12a7eb3561d6e3e7682ded943b.zip |
radius: introduced dae-server option to configure Dynamic Authorization Extenstion (DM/CoA) instead of dm_coa_secret
Diffstat (limited to 'accel-pptpd/radius/radius.c')
-rw-r--r-- | accel-pptpd/radius/radius.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/accel-pptpd/radius/radius.c b/accel-pptpd/radius/radius.c index 0a9f2da4..784361b1 100644 --- a/accel-pptpd/radius/radius.c +++ b/accel-pptpd/radius/radius.c @@ -37,6 +37,8 @@ char *conf_auth_secret; char *conf_acct_server; int conf_acct_server_port = 1813; char *conf_acct_secret; +char *conf_dm_coa_server; +int conf_dm_coa_port = 3799; char *conf_dm_coa_secret; int conf_sid_in_auth = 0; @@ -391,24 +393,36 @@ static void __init radius_init(void) else if (conf_nas_ip_address) conf_bind = conf_nas_ip_address; - opt = conf_get_opt("radius", "auth_server"); + opt = conf_get_opt("radius", "auth-server"); + if (!opt) + opt = conf_get_opt("radius", "auth_server"); if (!opt) { - log_emerg("radius: auth_server not specified\n"); + log_emerg("radius: auth-server not specified\n"); _exit(EXIT_FAILURE); } else if (parse_server(opt, &conf_auth_server, &conf_auth_server_port, &conf_auth_secret)) { log_emerg("radius: failed to parse auth_server\n"); _exit(EXIT_FAILURE); } - opt = conf_get_opt("radius", "acct_server"); + opt = conf_get_opt("radius", "acct-server"); + if (!opt) + opt = conf_get_opt("radius", "acct_server"); + if (!opt) + log_emerg("radius: acct-server not specified\n"); if (opt && parse_server(opt, &conf_acct_server, &conf_acct_server_port, &conf_acct_secret)) { log_emerg("radius: failed to parse acct_server\n"); _exit(EXIT_FAILURE); } - opt = conf_get_opt("radius", "dm_coa_secret"); - if (opt) - conf_dm_coa_secret = opt; + opt = conf_get_opt("radius", "dae-server"); + if (opt && parse_server(opt, &conf_dm_coa_server, &conf_dm_coa_port, &conf_dm_coa_secret)) { + log_emerg("radius: failed to parse dae-server\n"); + _exit(EXIT_FAILURE); + } else { + opt = conf_get_opt("radius", "dm_coa_secret"); + if (opt) + conf_dm_coa_secret = opt; + } opt = conf_get_opt("radius", "dictionary"); if (opt) |