diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index a01a6e38a1..001408a79e 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1169,6 +1169,10 @@ addressmap_get_virtual_address(int type) while ((next_virtual_addr & 0xff) == 0 || (next_virtual_addr & 0xff) == 0xff) { ++next_virtual_addr; + if (! --available) { + log_warn(LD_CONFIG, "Ran out of virtual addresses!"); + return NULL; + } } in.s_addr = htonl(next_virtual_addr); tor_inet_ntoa(&in, buf, sizeof(buf)); |