浏览代码

r9399@totoro: nickm | 2006-11-26 14:22:17 -0500
Actually, clients *should* try to guess their addresses.


svn:r8997

Nick Mathewson 19 年之前
父节点
当前提交
116ae04c2d
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/or/router.c

+ 3 - 3
src/or/router.c

@@ -1022,15 +1022,15 @@ router_new_address_suggestion(const char *suggestion)
 
   log_debug(LD_DIR, "Got X-Your-Address-Is: %s.", suggestion);
 
-  if (!server_mode(options))
-    return;
-
   if (resolve_my_address(LOG_INFO, options, &cur, NULL) >= 0) {
     /* We're all set -- we already know our address. Great. */
     last_guessed_ip = cur; /* store it in case we need it later */
     return;
   }
 
+  if (!server_mode(options))
+    return;
+
   if (last_guessed_ip != addr) {
     log_addr_has_changed(LOG_NOTICE, last_guessed_ip, addr);
     server_has_changed_ip();