summaryrefslogtreecommitdiff
path: root/src/or/routerset.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-10-02 13:54:20 +0200
committerNick Mathewson <nickm@torproject.org>2015-10-02 13:54:20 +0200
commit488e9a0502d0f177a00c4bf5f49ec218fdc65870 (patch)
treeab7424c6f8eee8ca28fea4a61c324f2249f51956 /src/or/routerset.c
parent0d44679d3bfbaae87ca1d611ad060a0319688418 (diff)
parent99d2869ab50a97013c1738783f3a7a0deb9d42c2 (diff)
downloadtor-488e9a0502d0f177a00c4bf5f49ec218fdc65870.tar.gz
tor-488e9a0502d0f177a00c4bf5f49ec218fdc65870.zip
Merge remote-tracking branch 'teor/routerset-parse-IPv6-literals'
(Minor conflicts)
Diffstat (limited to 'src/or/routerset.c')
-rw-r--r--src/or/routerset.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routerset.c b/src/or/routerset.c
index 3be55d3404..debe9ec6e1 100644
--- a/src/or/routerset.c
+++ b/src/or/routerset.c
@@ -107,10 +107,12 @@ routerset_parse(routerset_t *target, const char *s, const char *description)
description);
smartlist_add(target->country_names, countryname);
added_countries = 1;
- } else if ((strchr(nick,'.') || strchr(nick, '*')) &&
- (p = router_parse_addr_policy_item_from_string(
+ } else if ((strchr(nick,'.') || strchr(nick, ':') || strchr(nick, '*'))
+ && (p = router_parse_addr_policy_item_from_string(
nick, ADDR_POLICY_REJECT,
&malformed_list))) {
+ /* IPv4 addresses contain '.', IPv6 addresses contain ':',
+ * and wildcard addresses contain '*'. */
log_debug(LD_CONFIG, "Adding address %s to %s", nick, description);
smartlist_add(target->policies, p);
} else if (malformed_list) {