diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-26 22:51:25 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-26 22:51:25 +0000 |
commit | b3b14bf25db02e98ecd10ba42761a62b42bfae9b (patch) | |
tree | e1899443aef87e99b72ec85e0c93611ed6445883 /src/or/router.c | |
parent | 374c1e979f0206f50dc2afd026289d502ce49e30 (diff) | |
download | tor-b3b14bf25db02e98ecd10ba42761a62b42bfae9b.tar.gz tor-b3b14bf25db02e98ecd10ba42761a62b42bfae9b.zip |
Add some early checks to keep ipv6 addresses from failing by accident. Now, they fail on purpose, at least till 0.2.2.something.
svn:r17791
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c index ec36bdfe91..a3cb7c49e0 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1140,6 +1140,10 @@ router_compare_to_my_exit_policy(edge_connection_t *conn) if (tor_addr_is_null(&conn->_base.addr)) return -1; + /* XXXX IPv6 */ + if (tor_addr_family(&conn->_base.addr) != AF_INET) + return -1; + return compare_tor_addr_to_addr_policy(&conn->_base.addr, conn->_base.port, desc_routerinfo->exit_policy) != ADDR_POLICY_ACCEPTED; } |