From 34510f9278675e6e041503e425ca19a1fa0f3616 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 27 Apr 2011 17:21:41 -0400 Subject: [PATCH 1/2] Fix clear_trackhostexits_mapping() to actually work as advertised Previously, it would remove every trackhostexits-derived mapping *from* xyz..exit; it was supposed to remove every trackhostexits-derived mapping *to* xyz..exit. Bugfix on 0.2.0.20-rc: fixes an XXX020 added while staring at bug-1090 issues. --- changes/clear_trackexithost | 5 +++++ src/or/connection_edge.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changes/clear_trackexithost diff --git a/changes/clear_trackexithost b/changes/clear_trackexithost new file mode 100644 index 0000000000..701d369df3 --- /dev/null +++ b/changes/clear_trackexithost @@ -0,0 +1,5 @@ + o Minor bugfixes: + - Fix a bug in the code where we could keep trying to use a + TrackHostExits-based mapping after we failed to reach the intended + destination node. Bugfix on 0.2.0.20-rc. + diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 082cd5f1d7..2c1196c0cd 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -799,8 +799,8 @@ clear_trackexithost_mappings(const char *exitname) tor_strlower(suffix); STRMAP_FOREACH_MODIFY(addressmap, address, addressmap_entry_t *, ent) { - /* XXXX022 HEY! Shouldn't this look at ent->new_address? */ - if (ent->source == ADDRMAPSRC_TRACKEXIT && !strcmpend(address, suffix)) { + if (ent->source == ADDRMAPSRC_TRACKEXIT && + !strcmpend(ent->new_address, suffix)) { addressmap_ent_remove(address, ent); MAP_DEL_CURRENT(address); } From 7f85509a59b88173ac6060cd5925e28415f016b4 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 27 Apr 2011 17:26:28 -0400 Subject: [PATCH 2/2] I guess that had a bug number: add it to the changes file. --- changes/clear_trackexithost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/clear_trackexithost b/changes/clear_trackexithost index 701d369df3..b9ac6fec44 100644 --- a/changes/clear_trackexithost +++ b/changes/clear_trackexithost @@ -1,5 +1,5 @@ o Minor bugfixes: - Fix a bug in the code where we could keep trying to use a TrackHostExits-based mapping after we failed to reach the intended - destination node. Bugfix on 0.2.0.20-rc. + destination node. Fixes bug 2999. Bugfix on 0.2.0.20-rc.