mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Allow explicit-ipv4 / explicit-ipv6 addresses in per-user config files
If a machine is running remotely accessible services, it can be helpful to assign a fixed IP address upon connection.
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
1545130237
commit
71ff05cea7
@@ -58,6 +58,8 @@ static struct cfg_options available_options[] = {
|
||||
{ .name = "ipv6-network", .type = OPTION_STRING },
|
||||
{ .name = "ipv4-netmask", .type = OPTION_STRING },
|
||||
{ .name = "ipv6-prefix", .type = OPTION_NUMERIC },
|
||||
{ .name = "explicit-ipv4", .type = OPTION_STRING },
|
||||
{ .name = "explicit-ipv6", .type = OPTION_STRING },
|
||||
{ .name = "rx-data-per-sec", .type = OPTION_NUMERIC },
|
||||
{ .name = "tx-data-per-sec", .type = OPTION_NUMERIC },
|
||||
{ .name = "net-priority", .type = OPTION_STRING },
|
||||
@@ -205,6 +207,8 @@ unsigned prefix = 0;
|
||||
READ_RAW_STRING("ipv4-network", msg->ipv4_net);
|
||||
READ_RAW_STRING("ipv6-network", msg->ipv6_net);
|
||||
READ_RAW_STRING("ipv4-netmask", msg->ipv4_netmask);
|
||||
READ_RAW_STRING("explicit-ipv4", msg->explicit_ipv4);
|
||||
READ_RAW_STRING("explicit-ipv6", msg->explicit_ipv6);
|
||||
|
||||
msg->ipv6_prefix = extract_prefix(msg->ipv6_net);
|
||||
if (msg->ipv6_prefix == 0) {
|
||||
|
||||
Reference in New Issue
Block a user