mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
Merge remote-tracking branch 'public/bug6244_part2' into maint-0.2.3
This commit is contained in:
commit
217862b317
2 changed files with 13 additions and 4 deletions
4
changes/bug6244_part2
Normal file
4
changes/bug6244_part2
Normal file
|
@ -0,0 +1,4 @@
|
|||
o Minor bugfixes:
|
||||
- When formatting wildcarded address mappings for the controller,
|
||||
be sure to include "*." as appropriate. Partial fix for bug 6244;
|
||||
bugfix on 0.2.3.9-alpha.
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue