[tor-commits] [tor/master] Merge remote-tracking branch 'public/bug12848_024' into maint-0.2.5

nickm at torproject.org nickm at torproject.org
Thu Aug 14 03:16:19 UTC 2014


commit d443658fade3b4090d0b93903b4aec857cab03ea
Merge: 789c8d8 0044d74
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Aug 13 23:14:28 2014 -0400

    Merge remote-tracking branch 'public/bug12848_024' into maint-0.2.5
    
    Conflicts:
    	src/or/circuitbuild.c

 changes/bug12848      |    4 ++++
 src/or/channel.c      |    8 ++++++++
 src/or/circuitbuild.c |   12 ++++++++----
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --cc src/or/channel.c
index 3072eff,cd55bd0..ffd6849
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@@ -2681,7 -2622,17 +2681,15 @@@ is_destroy_cell(channel_t *chan
  int
  channel_send_destroy(circid_t circ_id, channel_t *chan, int reason)
  {
 -  cell_t cell;
 -
    tor_assert(chan);
+   if (circ_id == 0) {
+     log_warn(LD_BUG, "Attempted to send a destroy cell for circID 0 "
+              "on a channel " U64_FORMAT " at %p in state %s (%d)",
+              U64_PRINTF_ARG(chan->global_identifier),
+              chan, channel_state_to_string(chan->state),
+              chan->state);
+     return 0;
+   }
  
    /* Check to make sure we can send on this channel first */
    if (!(chan->state == CHANNEL_STATE_CLOSING ||
diff --cc src/or/circuitbuild.c
index 283afee,5325eff..897f90f
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@@ -657,13 -584,9 +658,11 @@@ circuit_deliver_create_cell(circuit_t *
  
    id = get_unique_circ_id_by_chan(circ->n_chan);
    if (!id) {
 -    log_warn(LD_CIRC,"failed to get unique circID.");
 +    static ratelim_t circid_warning_limit = RATELIM_INIT(9600);
 +    log_fn_ratelim(&circid_warning_limit, LOG_WARN, LD_CIRC,
 +                   "failed to get unique circID.");
-     return -1;
+     goto error;
    }
-   log_debug(LD_CIRC,"Chosen circID %u.", (unsigned)id);
-   circuit_set_n_circid_chan(circ, id, circ->n_chan);
  
    memset(&cell, 0, sizeof(cell_t));
    r = relayed ? create_cell_format_relayed(&cell, create_cell)





More information about the tor-commits mailing list