瀏覽代碼

make explicit that 'no socks policy' means 'accept'

svn:r2158
Roger Dingledine 20 年之前
父節點
當前提交
f8c14e5dce
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/or/connection_edge.c

+ 2 - 0
src/or/connection_edge.c

@@ -985,6 +985,8 @@ int socks_policy_permits_address(uint32_t addr)
   if (options.SocksPolicy && !socks_policy)
     parse_socks_policy();
 
+  if(!socks_policy)
+    return 1;
   a = router_compare_addr_to_exit_policy(addr, 1, socks_policy);
   if (a==-1)
     return 0;