Skip to content
Snippets Groups Projects
Commit e62fe2f0 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Put braces around reject-lines for IPv6 addrs

Fixes bug 17149; bug not in any released Tor.
parent 2a902ae5
No related branches found
No related tags found
No related merge requests found
......@@ -1037,7 +1037,7 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest,
"address", fmt_addr(ipv6_local_address));
} else {
char buf6[POLICY_BUF_LEN];
tor_snprintf(buf6, sizeof(buf6), "reject %s:*",
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 "
......@@ -1075,7 +1075,7 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest,
* address */
if (ipv6_local_address == NULL
|| !tor_addr_eq(ipv6_local_address, a)) {
tor_snprintf(bufif, sizeof(bufif), "reject6 %s:*",
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 "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment