mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Added the configuration option deny-roaming.
That required moving the read of the group configuration during the cookie authentication phase.
This commit is contained in:
@@ -42,6 +42,7 @@ struct cfg_options {
|
||||
|
||||
static struct cfg_options available_options[] = {
|
||||
{ .name = "no-udp", .type = OPTION_BOOLEAN },
|
||||
{ .name = "deny-roaming", .type = OPTION_BOOLEAN },
|
||||
{ .name = "route", .type = OPTION_MULTI_LINE },
|
||||
{ .name = "iroute", .type = OPTION_MULTI_LINE },
|
||||
{ .name = "dns", .type = OPTION_MULTI_LINE },
|
||||
@@ -169,6 +170,7 @@ struct group_cfg_st *sconfig = &proc->config;
|
||||
} while((val = optionNextValue(pov, prev)) != NULL);
|
||||
|
||||
READ_TF("no-udp", sconfig->no_udp, (global_config->udp_port!=0)?0:1);
|
||||
READ_TF("deny-roaming", sconfig->deny_roaming, global_config->deny_roaming);
|
||||
|
||||
READ_RAW_MULTI_LINE("route", sconfig->routes, sconfig->routes_size);
|
||||
READ_RAW_MULTI_LINE("iroute", sconfig->iroutes, sconfig->iroutes_size);
|
||||
@@ -249,8 +251,6 @@ static int get_sup_config(struct cfg_st *global_config, struct proc_st *proc)
|
||||
char file[_POSIX_PATH_MAX];
|
||||
int ret;
|
||||
|
||||
memset(&proc->config, 0, sizeof(proc->config));
|
||||
|
||||
if (global_config->per_group_dir != NULL && proc->groupname[0] != 0) {
|
||||
snprintf(file, sizeof(file), "%s/%s", global_config->per_group_dir,
|
||||
proc->groupname);
|
||||
|
||||
Reference in New Issue
Block a user