diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuitbuild.c | 3 | ||||
-rw-r--r-- | src/or/config.c | 13 | ||||
-rw-r--r-- | src/or/directory.c | 3 | ||||
-rw-r--r-- | src/or/hibernate.c | 4 | ||||
-rw-r--r-- | src/or/or.h | 1 | ||||
-rw-r--r-- | src/or/routerlist.c | 6 |
6 files changed, 8 insertions, 22 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index b108b1e99..f81e835c2 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1144,8 +1144,7 @@ static routerinfo_t *choose_good_entry_server(cpath_build_state_t *state) for(i=0; i < smartlist_len(rl->routers); i++) { r = smartlist_get(rl->routers, i); tor_snprintf(buf, sizeof(buf), "%d", r->or_port); - if (!smartlist_string_isin(options.FirewallPorts ? - options.FirewallPorts : config_get_default_firewallports(), buf)) + if (!smartlist_string_isin(options.FirewallPorts, buf)) smartlist_add(excluded, r); } } diff --git a/src/or/config.c b/src/or/config.c index 1b097160f..4381c70af 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -105,7 +105,7 @@ static config_var_t config_vars[] = { VAR("ExitPolicy", LINELIST, ExitPolicy, NULL), VAR("ExcludeNodes", STRING, ExcludeNodes, NULL), VAR("FascistFirewall", BOOL, FascistFirewall, "0"), - VAR("FirewallPorts", CSV, FirewallPorts, NULL), + VAR("FirewallPorts", CSV, FirewallPorts, "80,443"), VAR("MyFamily", STRING, MyFamily, NULL), VAR("NodeFamily", LINELIST, NodeFamilies, NULL), VAR("Group", STRING, Group, NULL), @@ -831,17 +831,6 @@ static int check_nickname_list(const char *lst, const char *name) return r; } -smartlist_t *config_get_default_firewallports(void) { - static smartlist_t *answer; - - if(!answer) { - answer = smartlist_create(); - smartlist_add(answer, tor_strdup("80")); - smartlist_add(answer, tor_strdup("443")); - } - return answer; -} - static int validate_options(or_options_t *options) { diff --git a/src/or/directory.c b/src/or/directory.c index 1ff80b811..998e3539b 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -132,8 +132,7 @@ directory_post_to_dirservers(uint8_t purpose, const char *payload, if (options.FascistFirewall && purpose == DIR_PURPOSE_UPLOAD_DIR && !options.HttpProxy) { tor_snprintf(buf,sizeof(buf),"%d",ds->dir_port); - if (!smartlist_string_isin(options.FirewallPorts ? - options.FirewallPorts : config_get_default_firewallports(), buf)) + if (!smartlist_string_isin(options.FirewallPorts, buf)) continue; } directory_initiate_command_trusted_dir(ds, purpose, payload, payload_len); diff --git a/src/or/hibernate.c b/src/or/hibernate.c index b733210f3..bdd2979af 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -5,7 +5,9 @@ /** * \file hibernate.c * \brief Functions to close listeners, stop allowing new circuits, - * etc in preparation for closing down or going dormant. + * etc in preparation for closing down or going dormant; and to track + * bandwidth and time intervals to know when to hibernate and when to + * stop hibernating. **/ /* diff --git a/src/or/or.h b/src/or/or.h index db20f75e3..b82524729 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1088,7 +1088,6 @@ struct config_line_t { int config_assign_default_dirservers(void); int resolve_my_address(const char *address, uint32_t *addr); -smartlist_t *config_get_default_firewallports(void); int getconfig(int argc, char **argv, or_options_t *options); int config_init_logs(or_options_t *options); void config_parse_exit_policy(struct config_line_t *cfg, diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 0e8e977b5..2ed8d1b6a 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -178,8 +178,7 @@ router_pick_directory_server_impl(int requireothers, int fascistfirewall) continue; if(fascistfirewall) { tor_snprintf(buf,sizeof(buf),"%d",router->dir_port); - if (!smartlist_string_isin(options.FirewallPorts ? - options.FirewallPorts : config_get_default_firewallports(), buf)) + if (!smartlist_string_isin(options.FirewallPorts, buf)) continue; } smartlist_add(sl, router); @@ -214,8 +213,7 @@ router_pick_trusteddirserver_impl(int requireother, int fascistfirewall) continue; if (fascistfirewall) { tor_snprintf(buf,sizeof(buf),"%d",d->dir_port); - if (!smartlist_string_isin(options.FirewallPorts ? - options.FirewallPorts : config_get_default_firewallports(), buf)) + if (!smartlist_string_isin(options.FirewallPorts, buf)) continue; } smartlist_add(sl, d); |