summaryrefslogtreecommitdiff
path: root/src/or/addressmap.c
diff options
context:
space:
mode:
authorPaolo Inglese <paolo.ingls@gmail.com>2016-10-03 12:18:51 +0100
committerPaolo Inglese <paolo.ingls@gmail.com>2016-10-03 12:18:51 +0100
commitae4077916c94e9c15fa2800f51409ccb116bf63f (patch)
treefc2cfe29aa6db68d711e8447ee582fb2a048e5da /src/or/addressmap.c
parent14a604721091d3995c9905efe52e9f2fb789afaa (diff)
downloadtor-ae4077916c94e9c15fa2800f51409ccb116bf63f.tar.gz
tor-ae4077916c94e9c15fa2800f51409ccb116bf63f.zip
Fix parse_virtual_addr_network minimum network size
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;
}