diff options
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 19ed12d7c1..b6c5dd41f4 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -504,9 +504,12 @@ dirserv_free_fingerprint_list(void) static int dirserv_router_has_valid_address(routerinfo_t *ri) { + tor_addr_t addr; if (get_options()->DirAllowPrivateAddresses) return 0; /* whatever it is, we're fine with it */ - if (is_internal_IP(ri->addr, 0)) { + tor_addr_from_ipv4h(&addr, ri->addr); + + if (tor_addr_is_internal(&addr, 0)) { log_info(LD_DIRSERV, "Router %s published internal IP address. Refusing.", router_describe(ri)); |