瀏覽代碼

when listing min-bandwidth servers in the controller, don't get
fooled by a low bandwidthrate


svn:r4777

Roger Dingledine 19 年之前
父節點
當前提交
cc1b82ade8
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/or/dirserv.c

+ 3 - 1
src/or/dirserv.c

@@ -463,7 +463,9 @@ dirserver_getinfo_unregistered(const char *question)
   for (i = 0; i < smartlist_len(descriptor_list); ++i) {
     ent = smartlist_get(descriptor_list, i);
     r = dirserv_router_fingerprint_is_known(ent);
-    if (ent->bandwidthcapacity >= min_bw && r == 0) {
+    if (ent->bandwidthcapacity >= min_bw &&
+        ent->bandwidthrate >= min_bw &&
+        r == 0) {
       /* then log this one */
       tor_snprintf(buf, sizeof(buf),
                    "%s: BW %d on '%s'.",