summaryrefslogtreecommitdiff
path: root/accel-pptpd/radius/radius.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-11-09 12:38:22 +0300
committerKozlov Dmitry <dima@server>2010-11-09 12:43:58 +0300
commitd0130adf3aaca9fa3fee227a06f3e1cfcbf40784 (patch)
tree7936cf76dc66b6fbcc7d715ab75c061ebf34f3d3 /accel-pptpd/radius/radius.c
parent08344fe080a5557295b03c46262fc6f4d2845d7a (diff)
downloadaccel-ppp-d0130adf3aaca9fa3fee227a06f3e1cfcbf40784.tar.gz
accel-ppp-d0130adf3aaca9fa3fee227a06f3e1cfcbf40784.zip
radius: skip nas identification if no NAS-Identifier/NAS-IP-Address presents
Diffstat (limited to 'accel-pptpd/radius/radius.c')
-rw-r--r--accel-pptpd/radius/radius.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/accel-pptpd/radius/radius.c b/accel-pptpd/radius/radius.c
index ed9830bc..0a9f2da4 100644
--- a/accel-pptpd/radius/radius.c
+++ b/accel-pptpd/radius/radius.c
@@ -40,6 +40,7 @@ char *conf_acct_secret;
char *conf_dm_coa_secret;
int conf_sid_in_auth = 0;
+int conf_require_nas_ident = 0;
static LIST_HEAD(sessions);
static pthread_rwlock_t sessions_lock = PTHREAD_RWLOCK_INITIALIZER;
@@ -308,7 +309,7 @@ int rad_check_nas_pack(struct rad_packet_t *pack)
ipaddr = attr->val.ipaddr;
}
- if (!ident && !ipaddr)
+ if (conf_require_nas_ident && !ident && !ipaddr)
return -1;
if (conf_nas_identifier && ident && strcmp(conf_nas_identifier, ident))
@@ -417,6 +418,10 @@ static void __init radius_init(void)
if (opt && atoi(opt) > 0)
conf_sid_in_auth = 1;
+ opt = conf_get_opt("radius", "require-nas-identification");
+ if (opt && atoi(opt) > 0)
+ conf_require_nas_ident = 1;
+
if (rad_dict_load(dict))
_exit(EXIT_FAILURE);