aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-12-07 14:44:23 +1100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-12-07 14:46:19 +1100
commit021958934f02919eabca884f935cb27a013b4ab9 (patch)
treebdb00a3e78f87826ec27504fbc872165811943ea /src/or/policies.c
parentee5337e90497e31c1ef18630c4f089e70bda5269 (diff)
downloadtor-021958934f02919eabca884f935cb27a013b4ab9.tar.gz
tor-021958934f02919eabca884f935cb27a013b4ab9.zip
Consistently ignore multicast in internal reject private exit policies
Consistently ignore multicast addresses when automatically generating reject private exit policies. Closes ticket 17763. Bug fix on 10a6390deb3c9, not in any released version of Tor. Patch by "teor".
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 126ba465df..943b0c4492 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -907,7 +907,8 @@ addr_policy_append_reject_addr(smartlist_t **dest, const tor_addr_t *addr)
static int
tor_addr_is_public_for_reject(const tor_addr_t *addr)
{
- return !tor_addr_is_null(addr) && !tor_addr_is_internal(addr, 0);
+ return (!tor_addr_is_null(addr) && !tor_addr_is_internal(addr, 0)
+ && !tor_addr_is_multicast(addr));
}
/* Add "reject <b>addr</b>:*" to <b>dest</b>, creating the list as needed.