diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2015-09-15 18:57:00 +1000 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2015-09-16 02:58:34 +1000 |
commit | eb1759e63cccc9fb870dfb2f87b21ce1e6d4df2d (patch) | |
tree | 002bdc53f38e8160a16d624478acc0e44c3788df /src/or/policies.c | |
parent | 098b82c7b2a6bb711e3616eb5b7e7e5e7401f01d (diff) | |
download | tor-eb1759e63cccc9fb870dfb2f87b21ce1e6d4df2d.tar.gz tor-eb1759e63cccc9fb870dfb2f87b21ce1e6d4df2d.zip |
Log an info-level message for each IP blocked by ExitPolicyRejectPrivate
Log an info-level message containing the reject line added to the
exit policy for each local IP address blocked by ExitPolicyRejectPrivate:
- Published IPv4 and IPv6 addresses
- Publicly routable IPv4 and IPv6 interface addresses
Diffstat (limited to 'src/or/policies.c')
-rw-r--r-- | src/or/policies.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index 1031fc0cca..641b109696 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -1014,6 +1014,8 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest, char buf[POLICY_BUF_LEN]; tor_snprintf(buf, sizeof(buf), "reject %s:*", fmt_addr32(local_address)); append_exit_policy_string(dest, buf); + log_info(LD_CONFIG, "Adding a reject ExitPolicy '%s' for our published " + "IPv4 address", buf); } /* Reject our local IPv6 address */ if (ipv6_exit && ipv6_local_address != NULL) { @@ -1025,6 +1027,8 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest, tor_snprintf(buf6, sizeof(buf6), "reject %s:*", fmt_addr(ipv6_local_address)); append_exit_policy_string(dest, buf6); + log_info(LD_CONFIG, "Adding a reject ExitPolicy '%s' for our " + "published IPv6 address", buf6); } } /* Reject local addresses from public netblocks on any interface, @@ -1061,6 +1065,8 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest, tor_snprintf(bufif, sizeof(bufif), "reject6 %s:*", fmt_addr(a)); append_exit_policy_string(dest, bufif); + log_info(LD_CONFIG, "Adding a reject ExitPolicy '%s' for a local " + "interface's public IPv6 address", bufif); } } SMARTLIST_FOREACH_END(a); free_interface_address6_list(public_addresses); |