aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.h
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-11-16 15:54:57 +1100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-11-20 10:39:13 +1100
commit66fac9fbadae529349f00172760688cf3caeb64d (patch)
tree64f278e70503f13a0cdf8c7cdf8d9afda7063343 /src/or/config.h
parente726ad466445e600b006295a8d2315643d1680da (diff)
downloadtor-66fac9fbadae529349f00172760688cf3caeb64d.tar.gz
tor-66fac9fbadae529349f00172760688cf3caeb64d.zip
Block OutboundBindAddressIPv[4|6]_ and configured ports on exit relays
Modify policies_parse_exit_policy_reject_private so it also blocks the addresses configured for OutboundBindAddressIPv4_ and OutboundBindAddressIPv6_, and any publicly routable port addresses on exit relays. Add and update unit tests for these functions.
Diffstat (limited to 'src/or/config.h')
-rw-r--r--src/or/config.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/config.h b/src/or/config.h
index 51f7e90a2b..7e8868804e 100644
--- a/src/or/config.h
+++ b/src/or/config.h
@@ -76,7 +76,7 @@ int write_to_data_subdir(const char* subdir, const char* fname,
int get_num_cpus(const or_options_t *options);
-const smartlist_t *get_configured_ports(void);
+MOCK_DECL(const smartlist_t *,get_configured_ports,(void));
int get_first_advertised_port_by_type_af(int listener_type,
int address_family);
#define get_primary_or_port() \
@@ -140,6 +140,8 @@ smartlist_t *get_options_for_server_transport(const char *transport);
extern struct config_format_t options_format;
#endif
+STATIC port_cfg_t *port_cfg_new(size_t namelen);
+STATIC void port_cfg_free(port_cfg_t *port);
STATIC void or_options_free(or_options_t *options);
STATIC int options_validate(or_options_t *old_options,
or_options_t *options,