mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
Allow prefixes in specifying the IPv4 network
This commit is contained in:
+8
-1
@@ -402,6 +402,7 @@ unsigned j, i, mand;
|
||||
char** auth = NULL;
|
||||
unsigned auth_size = 0;
|
||||
unsigned prefix = 0, auto_select_group = 0;
|
||||
unsigned prefix4 = 0;
|
||||
char *tmp;
|
||||
unsigned force_cert_auth;
|
||||
|
||||
@@ -664,7 +665,13 @@ unsigned force_cert_auth;
|
||||
READ_STRING("proxy-url", config->proxy_url);
|
||||
|
||||
READ_STRING("ipv4-network", config->network.ipv4);
|
||||
READ_STRING("ipv4-netmask", config->network.ipv4_netmask);
|
||||
|
||||
prefix4 = extract_prefix(config->network.ipv4);
|
||||
if (prefix4 == 0) {
|
||||
READ_STRING("ipv4-netmask", config->network.ipv4_netmask);
|
||||
} else {
|
||||
config->network.ipv4_netmask = ipv4_prefix_to_mask(config, prefix4);
|
||||
}
|
||||
|
||||
READ_STRING("ipv6-network", config->network.ipv6);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user