diff options
author | Roger Dingledine <arma@torproject.org> | 2005-04-02 08:55:31 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-04-02 08:55:31 +0000 |
commit | 13e211de17768206f6822dd5a3a6bdf5fda2ded9 (patch) | |
tree | 96f266a256d49f5592354c8828114ee0c78dfa85 | |
parent | 8dbdbfb8310e45f725b10b04b147fef2cf302fdd (diff) | |
download | tor-13e211de17768206f6822dd5a3a6bdf5fda2ded9.tar.gz tor-13e211de17768206f6822dd5a3a6bdf5fda2ded9.zip |
We're printing the host mask wrong in exit policies in server descriptors.
I believe this isn't a critical bug tho, since we're still obeying the
exit policy internally.
svn:r3987
-rw-r--r-- | src/or/router.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c index 2e7aa5eff3..5c3b416245 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -861,8 +861,8 @@ int router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, /* Write the exit policy to the end of 's'. */ for (tmpe=router->exit_policy; tmpe; tmpe=tmpe->next) { - in.s_addr = htonl(tmpe->addr); /* Write: "accept 1.2.3.4" */ + in.s_addr = htonl(tmpe->addr); tor_inet_ntoa(&in, addrbuf, sizeof(addrbuf)); result = tor_snprintf(s+written, maxlen-written, "%s %s", tmpe->policy_type == ADDR_POLICY_ACCEPT ? "accept" : "reject", @@ -872,8 +872,8 @@ int router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, written += result; if (tmpe->msk != 0xFFFFFFFFu && tmpe->msk != 0) { /* Write "/255.255.0.0" */ - tor_inet_ntoa(&in, addrbuf, sizeof(addrbuf)); in.s_addr = htonl(tmpe->msk); + tor_inet_ntoa(&in, addrbuf, sizeof(addrbuf)); result = tor_snprintf(s+written, maxlen-written, "/%s", addrbuf); if (result<0) return -1; |