aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-19 19:40:45 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-19 19:40:45 +0000
commit4a240552c4ea837e174f37e04a19fb9f01e03d6d (patch)
tree7d4a5a17a1d403ed85384e9260767931d3d301c9 /src/or/routerparse.c
parentbbbf50428102156359974e33bbcb70537132ace9 (diff)
downloadtor-4a240552c4ea837e174f37e04a19fb9f01e03d6d.tar.gz
tor-4a240552c4ea837e174f37e04a19fb9f01e03d6d.zip
r13834@catbus: nickm | 2007-07-19 15:40:42 -0400
Another patch from croup: drop support for address masks that do not correspond to bit prefixes. Nobody has used this for a while, and we have given warnings for a long time. svn:r10881
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index ecbc5fb46f..3967f7fd90 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2092,7 +2092,7 @@ router_parse_addr_policy_from_string(const char *s, int assume_action)
{
directory_token_t *tok = NULL;
const char *cp;
- char *tmp;
+ char *tmp = NULL;
addr_policy_t *r;
size_t len, idx;
const char *eos;
@@ -2175,7 +2175,7 @@ router_parse_addr_policy(directory_token_t *tok)
newe->policy_type = (tok->tp == K_REJECT) ? ADDR_POLICY_REJECT
: ADDR_POLICY_ACCEPT;
- if (parse_addr_and_port_range(arg, &newe->addr, &newe->msk,
+ if (parse_addr_and_port_range(arg, &newe->addr, &newe->maskbits,
&newe->prt_min, &newe->prt_max))
goto policy_read_failed;
@@ -2229,7 +2229,7 @@ router_parse_addr_policy_private(directory_token_t *tok)
tok->tp == K_REJECT ? "reject" : "accept",
private_nets[net], arg);
if (parse_addr_and_port_range((*nextp)->string + 7,
- &(*nextp)->addr, &(*nextp)->msk,
+ &(*nextp)->addr, &(*nextp)->maskbits,
&(*nextp)->prt_min, &(*nextp)->prt_max)) {
log_warn(LD_BUG, "Couldn't parse an address range we generated!");
return NULL;
@@ -2253,7 +2253,7 @@ assert_addr_policy_ok(addr_policy_t *t)
tor_assert(t2);
tor_assert(t2->policy_type == t->policy_type);
tor_assert(t2->addr == t->addr);
- tor_assert(t2->msk == t->msk);
+ tor_assert(t2->maskbits == t->maskbits);
tor_assert(t2->prt_min == t->prt_min);
tor_assert(t2->prt_max == t->prt_max);
tor_assert(!strcmp(t2->string, t->string));