mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
Use /128 as default IPv6 prefix to be backwards compatible
This commit is contained in:
+1
-7
@@ -940,13 +940,7 @@ size_t urlfw_size = 0;
|
||||
}
|
||||
|
||||
if (config->network.ipv6_subnet_prefix == 0) {
|
||||
config->network.ipv6_subnet_prefix = config->network.ipv6_prefix+16;
|
||||
if (config->network.ipv6_subnet_prefix > 128) {
|
||||
fprintf(stderr, "Cannot figure a valid IPv6 subnet prefix\n");
|
||||
exit(1);
|
||||
}
|
||||
if (config->network.ipv6_subnet_prefix < 64)
|
||||
config->network.ipv6_subnet_prefix = 64;
|
||||
config->network.ipv6_subnet_prefix = 128;
|
||||
} else if (config->network.ipv6_prefix >= config->network.ipv6_subnet_prefix) {
|
||||
fprintf(stderr, "The subnet prefix (%u) cannot be smaller or equal to network's (%u)\n",
|
||||
config->network.ipv6_subnet_prefix, config->network.ipv6_prefix);
|
||||
|
||||
Reference in New Issue
Block a user