diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-28 10:49:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-28 10:49:32 -0400 |
commit | 217862b3172490d5a620d947d7d56be47ccf1dde (patch) | |
tree | dd66d927b1c6a331d9560d257ed6143b33634bf7 /src/or | |
parent | dc9dd2324b848643908082442207469c50a46f43 (diff) | |
parent | 28c42fe029a2a6029b17cc35821d82ba2b9bf318 (diff) | |
download | tor-217862b3172490d5a620d947d7d56be47ccf1dde.tar.gz tor-217862b3172490d5a620d947d7d56be47ccf1dde.zip |
Merge remote-tracking branch 'public/bug6244_part2' into maint-0.2.3
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 98920781a2..3c8b4bcc92 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1702,17 +1702,22 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires, addressmap_ent_remove(key, val); continue; } else if (val->new_address) { + const char *src_wc = val->src_wildcard ? "*." : ""; + const char *dst_wc = val->dst_wildcard ? "*." : ""; if (want_expiry) { if (val->expires < 3 || val->expires == TIME_MAX) - smartlist_add_asprintf(sl, "%s %s NEVER", key, val->new_address); + smartlist_add_asprintf(sl, "%s%s %s%s NEVER", + src_wc, key, dst_wc, val->new_address); else { char time[ISO_TIME_LEN+1]; format_iso_time(time, val->expires); - smartlist_add_asprintf(sl, "%s %s \"%s\"", key, val->new_address, - time); + smartlist_add_asprintf(sl, "%s%s %s%s \"%s\"", + src_wc, key, dst_wc, val->new_address, + time); } } else { - smartlist_add_asprintf(sl, "%s %s", key, val->new_address); + smartlist_add_asprintf(sl, "%s%s %s%s", + src_wc, key, dst_wc, val->new_address); } } } |