summaryrefslogtreecommitdiff
path: root/src/or/addressmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/addressmap.c')
-rw-r--r--src/or/addressmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/addressmap.c b/src/or/addressmap.c
index f7544abacc..33fd7e0f4a 100644
--- a/src/or/addressmap.c
+++ b/src/or/addressmap.c
@@ -774,7 +774,7 @@ parse_virtual_addr_network(const char *val, sa_family_t family,
const int ipv6 = (family == AF_INET6);
tor_addr_t addr;
maskbits_t bits;
- const int max_bits = ipv6 ? 40 : 16;
+ const int max_prefix_bits = ipv6 ? 104 : 16;
virtual_addr_conf_t *conf = ipv6 ? &virtaddr_conf_ipv6 : &virtaddr_conf_ipv4;
if (!val || val[0] == '\0') {
@@ -804,10 +804,10 @@ parse_virtual_addr_network(const char *val, sa_family_t family,
}
#endif
- if (bits > max_bits) {
+ if (bits > max_prefix_bits) {
if (msg)
tor_asprintf(msg, "VirtualAddressNetwork%s expects a /%d "
- "network or larger",ipv6?"IPv6":"", max_bits);
+ "network or larger",ipv6?"IPv6":"", max_prefix_bits);
return -1;
}