aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-01 21:49:01 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-01 21:49:01 -0400
commitfc9e84062b73535b63bb3cf555604b1acbcc4c61 (patch)
tree8c47eb7b3f82bb6bf00c19481f058372fa68fd84 /src/or/dirserv.c
parentdfc32177d9ec3b8a639d6831ca4bc92c4f273dcb (diff)
parent408bd98e79196933e447cbc68c73ecffebaf5a19 (diff)
downloadtor-fc9e84062b73535b63bb3cf555604b1acbcc4c61.tar.gz
tor-fc9e84062b73535b63bb3cf555604b1acbcc4c61.zip
Merge remote-tracking branch 'public/bug4645'
Conflicts: src/or/dirserv.c
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c5
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));