[PATCH -ocserv 3/5] Allow explicit-ipv4 / explicit-ipv6 addresses in per-user config files

Kevin Cernekee cernekee at gmail.com
Sun Feb 8 17:26:38 PST 2015


If a machine is running remotely accessible services, it can be helpful
to assign a fixed IP address upon connection.
---
 src/sup-config/file.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sup-config/file.c b/src/sup-config/file.c
index 861b047..867cbf7 100644
--- a/src/sup-config/file.c
+++ b/src/sup-config/file.c
@@ -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) {
-- 
1.9.1




More information about the openconnect-devel mailing list