[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit da30adcf0fd048d1f2e7a4b76e2c880cc3824e6e Merge: 5f035e2 9fec0c1 Author: Nick Mathewson Date: Thu Apr 18 11:16:05 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/common/crypto.c changes/less_charbuf_usage |5 + src/common/crypto.c| 23 src/common/crypto.h|4 + src/or/dirserv.c | 153 ++ src/or/dirserv.h | 25 + src/or/dirvote.c | 200 +++--- src/or/networkstatus.c |4 +- src/or/or.h|3 +- src/or/router.c| 148 ++--- src/or/router.h|4 +- src/or/routerparse.c | 74 + src/or/routerparse.h |5 +- src/test/test.c|3 +- src/test/test_dir.c| 259 14 files changed, 492 insertions(+), 418 deletions(-) diff --cc src/common/crypto.c index 1b5b558,0ababea..31a0df1 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@@ -1614,6 -1614,44 +1614,29 @@@ crypto_digest_assign(crypto_digest_t *i memcpy(into,from,sizeof(crypto_digest_t)); } + /** Given a list of strings in lst, set the len_out-byte digest + * at digest_out to the hash of the concatenation of those strings, + * plus the optional string append, computed with the algorithm + * alg. + * out_len must be \<= DIGEST256_LEN. */ + void + crypto_digest_smartlist(char *digest_out, size_t len_out, + const smartlist_t *lst, const char *append, + digest_algorithm_t alg) + { + crypto_digest_t *d; + if (alg == DIGEST_SHA1) + d = crypto_digest_new(); + else + d = crypto_digest256_new(alg); + SMARTLIST_FOREACH(lst, const char *, cp, + crypto_digest_add_bytes(d, cp, strlen(cp))); + if (append) + crypto_digest_add_bytes(d, append, strlen(append)); + crypto_digest_get_digest(d, digest_out, len_out); + crypto_digest_free(d); + } + -/** Compute the HMAC-SHA-1 of the msg_len bytes in msg, using - * the key of length key_len. Store the DIGEST_LEN-byte result - * in hmac_out. - */ -void -crypto_hmac_sha1(char *hmac_out, - const char *key, size_t key_len, - const char *msg, size_t msg_len) -{ - tor_assert(key_len < INT_MAX); - tor_assert(msg_len < INT_MAX); - HMAC(EVP_sha1(), key, (int)key_len, (unsigned char*)msg, (int)msg_len, - (unsigned char*)hmac_out, NULL); -} - /** Compute the HMAC-SHA-256 of the msg_len bytes in msg, using * the key of length key_len. Store the DIGEST256_LEN-byte * result in hmac_out. ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 1b5320bfe3d178c20357b9860087147a6cbb099b Merge: da30adc 06efbbb Author: Nick Mathewson Date: Thu Apr 18 11:28:11 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8719|6 ++ src/or/networkstatus.c |5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit ab3d5c049032651a9c9164262f9a8f81de9709d4 Merge: 1b5320b e35ca13 Author: Nick Mathewson Date: Thu Apr 18 21:42:39 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8716 |3 +++ src/or/config.c |3 ++- src/or/control.c |2 +- src/or/control.h |2 +- 4 files changed, 7 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 6defb10d723211b5a0830a408bd33863fd33872f Merge: 0124b10 b933360 Author: Nick Mathewson Date: Thu Apr 18 22:45:12 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8711 |6 ++ src/or/dirserv.c |9 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 68ea7d24d8e1ceb594ae5a63a3d433bd78a079cd Merge: 6e89d29 cab5f82 Author: Nick Mathewson Date: Wed Apr 24 22:05:41 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8253-fix |6 ++ src/or/circuitbuild.c |4 ++-- src/or/entrynodes.c |4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit ef83db4fe85f2c73b5891d5b8e53ca776dc230f8 Merge: 68ea7d2 f8bb006 Author: Nick Mathewson Date: Wed Apr 24 22:16:07 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug6026 |4 src/or/config.c |3 ++- src/or/connection.c |5 - src/or/router.c | 31 --- src/or/router.h |5 - 5 files changed, 38 insertions(+), 10 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 8f21838ee5305b89c4089a06ca51e95bc89ae053 Merge: 9c58905 7d3fd85 Author: Nick Mathewson Date: Wed May 8 13:01:58 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8845|3 +++ src/test/test_crypto.c |2 +- 2 files changed, 4 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 82ab33c9a66a9c45e9512b698ef203b1aaca7a3d Merge: 8f21838 bae5dd6 Author: Nick Mathewson Date: Thu May 9 13:20:01 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8844 |6 ++ src/or/buffers.c |3 ++- src/test/test.c | 12 3 files changed, 20 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 69f66b960c61af0e2f26c5785c9bbd6a0c9b5f39 Merge: d8f5c5b 0bfaf86 Author: Nick Mathewson Date: Wed May 15 10:44:17 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8879 |5 + src/or/buffers.c |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 95c34399cfb66a46371562f1532e8aa396243876 Merge: 69f66b9 31a6b4e Author: Nick Mathewson Date: Wed May 15 14:35:37 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/test/test.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 382dbe9819367cb838f1099f5f29897f8f5f8f51 Merge: df731ba bc56918 Author: Nick Mathewson Date: Fri May 17 14:54:19 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8846 |4 src/or/connection_edge.c |5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit c90c370ab361ff0103becbd6fab9e1a9b5a460fe Merge: 17090fa 0c2fb64 Author: Nick Mathewson Date: Mon May 20 12:37:58 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip-may2013 |3 + src/config/geoip |20373 + 2 files changed, 10221 insertions(+), 10155 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit cb488f99730c795fddca6f841fa35ce5248ea3b2 Merge: 826daaf a2e72ac Author: Nick Mathewson Date: Mon May 20 15:59:08 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug7982 |3 +++ src/or/or.h | 35 +++ 2 files changed, 38 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit feeef00a6ad4629ab0d73b85195c0c9c8e9d57f0 Merge: cb488f9 30c06c1 Author: Nick Mathewson Date: Tue May 21 13:46:28 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8093.part1 |3 +++ src/or/relay.c| 10 -- 2 files changed, 7 insertions(+), 6 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit beec881f92d25b4e85aa30be341d30fce54b2e50 Merge: 4d7ac69 c03cfc0 Author: Nick Mathewson Date: Wed Jun 5 11:20:45 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' doc/tor.1.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 7159e19ea90b16d35beefd09ff84bf69b71d23ee Merge: beec881 c860a96 Author: Nick Mathewson Date: Wed Jun 5 11:22:36 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip-june2013 |3 + src/config/geoip |106050 +--- 2 files changed, 9168 insertions(+), 96885 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit c300720bfa107a54c2ce98a6937c0ce192673732 Merge: bcdc002 607b29a Author: Nick Mathewson Date: Mon Jun 10 12:28:30 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9017 |6 ++ src/or/connection_edge.c | 11 ++- 2 files changed, 12 insertions(+), 5 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a64d062c958eed643e3bb0802269af12f9eabcb7 Merge: 8c88c75 3bdc4e5 Author: Nick Mathewson Date: Wed Jun 12 10:01:10 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug2077_share_delete |7 +++ src/common/compat.c |2 +- src/test/test_microdesc.c| 16 +++- 3 files changed, 23 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 616fd790ecacf933e6a624a14a8971d9ebf70d5c Merge: a64d062 fff9386 Author: Nick Mathewson Date: Wed Jun 12 13:01:14 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug2077_share_delete |7 --- src/common/compat.c |2 +- 2 files changed, 1 insertion(+), 8 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit d7d65298982444d34a15ef0cb3e453ddd584619c Merge: 000b4f5 75b7cc1 Author: Nick Mathewson Date: Wed Jun 12 20:55:53 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8639 |5 + src/or/control.c | 17 +++-- src/or/dnsserv.c | 15 +++ 3 files changed, 35 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit ee250be6a66b4e2cf62a9dad8a6650634643c977 Merge: d7d6529 a3f6f33 Author: Nick Mathewson Date: Wed Jun 12 21:14:31 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8965 |3 + doc/TODO |3 - doc/contrib/authority-policy.txt | 89 --- doc/contrib/tor-rpm-creation.txt | 56 doc/contrib/torel-design.txt | 181 - doc/include.am |2 - doc/spec/README | 11 --- doc/tor-rpm-creation.txt | 56 doc/tor-win32-mingw-creation.txt | 119 - doc/translations.txt | 182 -- doc/v3-authority-howto.txt | 84 -- 11 files changed, 59 insertions(+), 727 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 8c69207793ecbe8404396493ae60ea3a21fb968b Merge: ee250be 74a534b Author: Nick Mathewson Date: Wed Jun 12 21:28:09 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' doc/HACKING | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 29498491432040168c5df7091097a7b8a9c9ad86 Merge: 8c69207 25dddf7 Author: Nick Mathewson Date: Thu Jun 13 09:43:53 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8822|5 + src/or/control.c |6 ++ src/or/dirserv.c |2 +- src/or/microdesc.c | 26 ++ 4 files changed, 30 insertions(+), 9 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 483385d2bdd391db2ecbb775935554558dba7b56 Merge: 73ca1cf 72f775e Author: Nick Mathewson Date: Thu Jun 13 21:59:27 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9047 |6 ++ src/common/compat.c | 15 +++ src/common/compat.h |1 + src/or/microdesc.c | 19 +-- 4 files changed, 35 insertions(+), 6 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit b1f44fc20ba19690493a674f163cd55c117b6ce9 Merge: 483385d 8b6d0bd Author: Nick Mathewson Date: Fri Jun 14 01:48:16 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Using "ours" strategy to avoid taking commits ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit b5d1fded3dfa836ef1f45f6acb74971f75d5caa9 Merge: 2974c83 efa342f Author: Nick Mathewson Date: Tue Jun 18 10:25:30 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9002 |4 ++ changes/bug9063_redux | 15 doc/tor.1.txt |9 + src/common/mempool.h |2 + src/or/circuitlist.c | 102 + src/or/circuitlist.h |1 + src/or/config.c |8 src/or/or.h |4 ++ src/or/relay.c| 33 +++- src/or/relay.h|1 + src/or/rendcommon.c | 25 +++- 11 files changed, 200 insertions(+), 4 deletions(-) diff --cc src/or/circuitlist.h index 94887d5,874f68c..03f678c --- a/src/or/circuitlist.h +++ b/src/or/circuitlist.h @@@ -63,9 -61,7 +63,10 @@@ int circuit_count_pending_on_channel(ch void assert_cpath_layer_ok(const crypt_path_t *cp); void assert_circuit_ok(const circuit_t *c); void circuit_free_all(void); + void circuits_handle_oom(size_t current_allocation); +void channel_note_destroy_pending(channel_t *chan, circid_t id); +void channel_note_destroy_not_pending(channel_t *chan, circid_t id); + #endif diff --cc src/or/relay.c index 38776bc,3138c5e..251d3ff --- a/src/or/relay.c +++ b/src/or/relay.c @@@ -2597,8 -2534,14 +2620,14 @@@ append_cell_to_circuit_queue(circuit_t } #endif - cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids); + cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids, 1); + if (PREDICT_UNLIKELY(cell_queues_check_size())) { + /* We ran the OOM handler */ + if (circ->marked_for_close) + return; + } + /* If we have too many cells on the circuit, we should stop reading from * the edge streams for a while. */ if (!streams_blocked && queue->n >= CELL_QUEUE_HIGHWATER_SIZE) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit f7986269c32b94929a705a8f125b353e505a488c Merge: 8a96a85 7c4544e Author: Nick Mathewson Date: Tue Jun 18 14:47:15 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/rendcommon.c |3 +++ 1 file changed, 3 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit cde1a2ca059d892a970c57fc265261125aefe2cb Merge: 10480df ca6aacc Author: Nick Mathewson Date: Mon Jun 24 12:55:29 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9122 |4 src/or/config.c |4 2 files changed, 8 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 1b93e3c6d9802d64db7ce752717cf02ed35d1b60 Merge: 34740a1 655adbf Author: Nick Mathewson Date: Thu Feb 6 13:27:04 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: changes/bug10485 src/or/rephist.c src/or/status.c changes/bug10485 |8 src/or/rephist.c |1 - src/or/status.c |3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --cc changes/bug10485 index aa599fb,7e5fa53..d2b3d8b --- a/changes/bug10485 +++ b/changes/bug10485 @@@ -1,4 -1,4 +1,12 @@@ ++<<< HEAD + o Minor bugfixes: +- Turn "circuit handshake stats since last time" log messages into a + heartbeat message. Fixes bug 10485; bugfix on 0.2.4.17-rc. + ++||| merged common ancestors ++=== + o Minor bugfixes: + - Move message about circuit handshake counts into the heartbeat + message where it belongs, instead of logging it once per hour + unconditionally. Fixes bug 10485; bugfix on 0.2.4.17-rc. ++>>> origin/maint-0.2.4 diff --cc src/or/rephist.c index dd4ef12,2948bf8..66dc5f6 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@@ -3017,8 -3041,7 +3017,7 @@@ voi rep_hist_log_circuit_handshake_stats(time_t now) { (void)now; - /* XXX024 maybe quiet this log message before 0.2.4 goes stable for real */ - log_notice(LD_HIST, "Circuit handshake stats since last time: " + log_notice(LD_HEARTBEAT, "Circuit handshake stats since last time: " "%d/%d TAP, %d/%d NTor.", onion_handshakes_completed[ONION_HANDSHAKE_TYPE_TAP], onion_handshakes_requested[ONION_HANDSHAKE_TYPE_TAP], diff --cc src/or/status.c index 415f4da,69f92ed..e1820c8 --- a/src/or/status.c +++ b/src/or/status.c @@@ -14,11 -14,8 +14,12 @@@ #include "router.h" #include "circuitlist.h" #include "main.h" +#include "rephist.h" #include "hibernate.h" + #include "rephist.h" +#include "statefile.h" + +static void log_accounting(const time_t now, const or_options_t *options); /** Return the total number of circuits. */ static int ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 2d41cab1502666eaace21f10385964737d246388 Merge: 1b93e3c 9e2de8c Author: Nick Mathewson Date: Thu Feb 6 16:12:42 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 5990edd1952361faca4619728b50587061d81be7 Merge: 075482f b4e8d8d Author: Nick Mathewson Date: Thu Feb 6 16:29:33 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 372adfa09a143490dfc058a6e2db78ca27ef9399 Merge: 5990edd a7e9465 Author: Nick Mathewson Date: Fri Feb 7 10:38:24 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9602|5 ++ src/or/channeltls.c| 193 +++- src/or/connection.c| 16 src/or/connection_or.c |5 ++ 4 files changed, 150 insertions(+), 69 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a0577aacb4a94e803b4d9ec266e969f1aa5a88f3 Merge: fdf6847 9bb34aa Author: Nick Mathewson Date: Fri Feb 7 17:41:41 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10835 |4 src/test/bench.c |4 2 files changed, 8 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a73b0da653db051275311ea791098a8a9dacc98f Merge: a0577aa 7f6aa78 Author: Nick Mathewson Date: Sun Feb 9 21:41:59 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/channeltls.c | 26 ++ 1 file changed, 26 insertions(+) diff --cc src/or/channeltls.c index 42d6874,d5428c1..959ec47 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@@ -53,10 -53,9 +53,11 @@@ static void channel_tls_common_init(cha static void channel_tls_close_method(channel_t *chan); static const char * channel_tls_describe_transport_method(channel_t *chan); + static void channel_tls_free_method(channel_t *chan); static int channel_tls_get_remote_addr_method(channel_t *chan, tor_addr_t *addr_out); +static int +channel_tls_get_transport_name_method(channel_t *chan, char **transport_out); static const char * channel_tls_get_remote_descr_method(channel_t *chan, int flags); static int channel_tls_has_queued_writes_method(channel_t *chan); @@@ -114,9 -113,9 +115,10 @@@ channel_tls_common_init(channel_tls_t * chan->state = CHANNEL_STATE_OPENING; chan->close = channel_tls_close_method; chan->describe_transport = channel_tls_describe_transport_method; + chan->free = channel_tls_free_method; chan->get_remote_addr = channel_tls_get_remote_addr_method; chan->get_remote_descr = channel_tls_get_remote_descr_method; + chan->get_transport_name = channel_tls_get_transport_name_method; chan->has_queued_writes = channel_tls_has_queued_writes_method; chan->is_canonical = channel_tls_is_canonical_method; chan->matches_extend_info = channel_tls_matches_extend_info_method; ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 0ee449ca92dc7f25517a63b63f4d521fdd48410b Merge: c3720c0 91d4bb0 Author: Nick Mathewson Date: Tue Feb 11 18:58:58 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/10777_netunreach |7 +++ changes/bug10777_internal_024 |4 src/or/reasons.c |5 +++-- src/or/relay.c|6 -- 4 files changed, 18 insertions(+), 4 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 2c0088b8aa360c8dfa4c38c45d50542fa9aae8fb Merge: 1ccc282 d6e6eab Author: Nick Mathewson Date: Wed Feb 12 09:17:11 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/reasons.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 339a47e80bcb898f96e41b9110dda07dd3a2fd05 Merge: 1987894 e4bc757 Author: Nick Mathewson Date: Sat Feb 15 00:03:29 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10904 |5 + src/common/compat.h|2 ++ src/common/container.h | 46 -- src/ext/ht.h | 16 4 files changed, 43 insertions(+), 26 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit c64b549621c8354efa3c58760f63a59660dcb974 Merge: 339a47e bc58bfd Author: Nick Mathewson Date: Sat Feb 15 00:07:15 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip-february2014 |3 + changes/geoip6-february2014 |3 + src/config/geoip|17809 +++ src/config/geoip6 | 7834 --- 4 files changed, 16432 insertions(+), 9217 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit bafae045ba4a117e2685a925f8a3e21e68368ed4 Merge: 3899cde 9f38cd9 Author: Nick Mathewson Date: Mon Feb 17 23:06:34 2014 + Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10929 |6 ++ configure.ac |2 +- 2 files changed, 7 insertions(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit c0835f8e75bf23497971b860742d019f39834c58 Merge: bafae04 e616f5b Author: Nick Mathewson Date: Tue Feb 18 01:16:22 2014 + Merge remote-tracking branch 'origin/maint-0.2.4' configure.ac |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 9bd77019cafcd9b8f4b76c875103093f5b4594e1 Merge: c857276 d21b24b Author: Nick Mathewson Date: Mon Feb 24 13:06:40 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 23a5921e9aebfa912f16bff541a9bdae5211ee86 Merge: 5015279 d7950ed Author: Nick Mathewson Date: Tue Feb 25 10:04:10 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip-february2014-regcountry |3 + src/config/geoip | 2399 ++--- 2 files changed, 1035 insertions(+), 1367 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 2f5d7bb7e9e7ce44cb90acdc7e84d0aa77e9322b Merge: f8e3c16 c3800f6 Author: Nick Mathewson Date: Tue Feb 25 15:59:43 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a50690e68f8a332321e88f0ac8c3046186bc1c1f Merge: 4a2a1e5 cbf9e74 Author: Nick Mathewson Date: Thu Mar 6 11:52:22 2014 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9393 |4 src/or/config.c |2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit def0cac3ee229b65ede6e5bfecf0326cdeca02df Merge: cce06b6 9077118 Author: Nick Mathewson Date: Tue Mar 11 11:23:46 2014 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit ef9c00f53962713e1f7866004f3b83a136cfcedc Merge: 3455274 8d9602c Author: Nick Mathewson Date: Fri May 16 09:17:34 2014 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' This is an "ours" merge, to avoid taking the commit that bumped maint-0.2.4's version to 0.2.4.22-dev. ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 173a1afc5819f1fcabfa34bab5714d61088cc29f Merge: 55c7a55 f5ce580 Author: Nick Mathewson Date: Tue Jun 10 21:09:27 2014 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip6-june2014 |2 + src/config/geoip|22394 --- src/config/geoip6 | 2115 +++-- 3 files changed, 16821 insertions(+), 7690 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 5e0404265fd0e1f297b4b587419870fcd58a9d7c Merge: 63234b1 0c3c475 Author: Nick Mathewson Date: Tue Oct 8 12:11:37 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9596 |4 src/or/policies.h |7 --- 2 files changed, 8 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 1060688d2a351329ad6a4b751e312242b57531a0 Merge: 5e04042 7e0f1fa Author: Nick Mathewson Date: Tue Oct 8 12:17:14 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug6979 |4 src/or/router.c |2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 66624ded3973ef9ad1e5fa5a3db53344186430e3 Merge: b571b96 50fc8fb Author: Nick Mathewson Date: Tue Oct 8 13:38:47 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/or/relay.c changes/bug9927|4 src/or/directory.c |2 ++ src/or/relay.c |1 + 3 files changed, 7 insertions(+) diff --cc src/or/relay.c index b2695ce,29dc361..d12850d --- a/src/or/relay.c +++ b/src/or/relay.c @@@ -1106,9 -1103,9 +1106,10 @@@ connection_edge_process_relay_cell_not_ control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_STATUS, 0); break; case DIR_PURPOSE_FETCH_SERVERDESC: + case DIR_PURPOSE_FETCH_MICRODESC: - control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, - count_loading_descriptors_progress()); + if (TO_DIR_CONN(dirconn)->router_purpose == ROUTER_PURPOSE_GENERAL) +control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, +count_loading_descriptors_progress()); break; } } ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 30b8fc3e0d5a2eafa052672619c733f3fa3d Merge: 66624de fa1034c Author: Nick Mathewson Date: Tue Oct 8 16:09:45 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Using "ours" strategy since we already merged the equivalent of #9866 into this branch. ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 9de456a303f1931bef43e5a48afdf08293279c45 Merge: 30b8fc3 b8abade Author: Nick Mathewson Date: Tue Oct 8 16:47:49 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9904 |4 src/common/address.c |2 ++ 2 files changed, 6 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 882fb8383da941ec8bec7a698caacd5924f25892 Merge: 9de456a 270dcc9 Author: Nick Mathewson Date: Wed Oct 9 09:45:21 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/9854 |3 +++ doc/tor.1.txt | 10 +++--- src/config/torrc.sample.in |9 ++--- 3 files changed, 16 insertions(+), 6 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 0e3cf3ebf82a5f53b551ac87bfa1db6887bf6e66 Merge: 882fb83 73a0bb1 Author: Nick Mathewson Date: Wed Oct 9 12:07:01 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Use "ours" strategy to avoid taking 73a0bb16b9b750be9a51470ff5 from 0.2.4. We _do_ want to keep torrc.sample.in changes in 0.2.5. ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 97285bc46550ba135a2567d89351159da8db99f8 Merge: 3b6c483 1137817 Author: Nick Mathewson Date: Thu Oct 10 10:55:58 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9928 |6 ++ src/common/util.c | 10 +- 2 files changed, 11 insertions(+), 5 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 3d817fa29cb9a0f58dd641aabf7f34301bf5809d Merge: 97285bc 7b1b8c3 Author: Nick Mathewson Date: Thu Oct 10 11:18:17 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/common/util.c|4 ++-- src/test/test_util.c |1 + 2 files changed, 3 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit df4693fed57d0a0026186beaa6bb819b854c5b10 Merge: 3d817fa 2c7ed04 Author: Nick Mathewson Date: Thu Oct 10 11:24:16 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9644 |4 src/or/routerlist.c | 29 ++--- 2 files changed, 26 insertions(+), 7 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 64293135df7611b7caa939eee57a8f0b9d29e617 Merge: f96a8d5 7ef2939 Author: Nick Mathewson Date: Fri Oct 11 11:17:18 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip-october2013 |3 + src/config/geoip | 2019 - 2 files changed, 1245 insertions(+), 777 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a19e3e26f467ecbf31f2c4174d699cd1989caf7a Merge: 4c60819 0e8ee79 Author: Nick Mathewson Date: Thu Oct 31 13:26:33 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 61029d69269d58e530028ee69b148581d3d8bd93 Merge: a19e3e2 1b312f7 Author: Nick Mathewson Date: Thu Oct 31 14:03:01 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug9780 |8 doc/tor.1.txt |2 +- src/common/tortls.c |4 +--- 3 files changed, 10 insertions(+), 4 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 8676a08362a192f17f2850359b16933c2a5786dd Merge: 61029d6 db2c2a6 Author: Nick Mathewson Date: Thu Oct 31 14:08:57 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Do an "ours" merge to not take the 0.2.4 fix for #9731 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit dde41fa1b00151e01e11341903069f5b2f0db1b7 Merge: 275ab61 5cc155e Author: Nick Mathewson Date: Thu Oct 31 16:10:19 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit fc5a881bd3bd635be897fafdd4f9a30d5b2bed14 Merge: e30fb0a 8bfa596 Author: Nick Mathewson Date: Sun Nov 10 12:24:12 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' doc/tor.1.txt |5 +++-- src/or/config.c | 22 +++--- src/or/router.c |4 ++-- 3 files changed, 16 insertions(+), 15 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit ff08b9b231d5b6625587865584843134bf1a4d67 Merge: fc5a881 a82b18f Author: Nick Mathewson Date: Mon Nov 11 10:50:05 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10124 |3 +++ 1 file changed, 3 insertions(+) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 7a2b30fe16eacc040b3dd11f8c39c410628c2f43 Merge: 4aa9aff 59f50c8 Author: Nick Mathewson Date: Fri Nov 15 15:35:00 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/or/relay.c Conflict changes were easy; compilation fixes required were using using TOR_SIMPLEQ_FIRST to get head of cell queue. changes/bug9093 |7 ++ src/common/util.c| 12 +++ src/common/util.h|1 + src/or/circuitlist.c | 58 +- src/or/or.h |5 + src/or/relay.c |7 +- 6 files changed, 79 insertions(+), 11 deletions(-) diff --cc src/or/circuitlist.c index 19f4618,b0e24a5..c31bc49 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@@ -1620,10 -1525,41 +1620,43 @@@ n_cells_in_circ_queues(const circuit_t return n; } - /** helper to sort a list of circuit_q by total queue lengths, in descending - * order. */ + /** + * Return the age of the oldest cell queued on c, in milliseconds. + * Return 0 if there are no cells queued on c. Requires that now be + * the current time in milliseconds since the epoch, truncated. + * + * This function will return incorrect results if the oldest cell queued on + * the circuit is older than 2**32 msec (about 49 days) old. + */ + static uint32_t + circuit_max_queued_cell_age(const circuit_t *c, uint32_t now) + { + uint32_t age = 0; - if (c->n_chan_cells.head) -age = now - c->n_chan_cells.head->inserted_time; ++ packed_cell_t *cell; ++ ++ if (NULL != (cell = TOR_SIMPLEQ_FIRST(&c->n_chan_cells.head))) ++age = now - cell->inserted_time; + + if (! CIRCUIT_IS_ORIGIN(c)) { + const or_circuit_t *orcirc = TO_OR_CIRCUIT((circuit_t*)c); -if (orcirc->p_chan_cells.head) { - uint32_t age2 = now - orcirc->p_chan_cells.head->inserted_time; ++if (NULL != (cell = TOR_SIMPLEQ_FIRST(&orcirc->p_chan_cells.head))) { ++ uint32_t age2 = now - cell->inserted_time; + if (age2 > age) + return age2; + } + } + return age; + } + + /** Temporary variable for circuits_compare_by_oldest_queued_cell_ This is a + * kludge to work around the fact that qsort doesn't provide a way for + * comparison functions to take an extra argument. */ + static uint32_t circcomp_now_tmp; + + /** Helper to sort a list of circuit_t by age of oldest cell, in descending + * order. Requires that circcomp_now_tmp is set correctly. */ static int - circuits_compare_by_queue_len_(const void **a_, const void **b_) + circuits_compare_by_oldest_queued_cell_(const void **a_, const void **b_) { const circuit_t *a = *a_; const circuit_t *b = *b_; @@@ -1667,12 -1604,16 +1701,16 @@@ circuits_handle_oom(size_t current_allo /* This algorithm itself assumes that you've got enough memory slack * to actually run it. */ - for (circ = global_circuitlist; circ; circ = circ->next) + TOR_LIST_FOREACH(circ, &global_circuitlist, head) smartlist_add(circlist, circ); + /* Set circcomp_now_tmp so that the sort can work. */ + tor_gettimeofday_cached(&now); + circcomp_now_tmp = (uint32_t)tv_to_msec(&now); + /* This is O(n log n); there are faster algorithms we could use instead. * Let's hope this doesn't happen enough to be in the critical path. */ - smartlist_sort(circlist, circuits_compare_by_queue_len_); + smartlist_sort(circlist, circuits_compare_by_oldest_queued_cell_); /* Okay, now the worst circuits are at the front of the list. Let's mark * them, and reclaim their storage aggressively. */ diff --cc src/or/or.h index a313248,5318b0f..6b18f13 --- a/src/or/or.h +++ b/src/or/or.h @@@ -1108,20 -1073,17 +1108,25 @@@ typedef struct var_cell_t uint8_t payload[FLEXIBLE_ARRAY_MEMBER]; } var_cell_t; +/** A parsed Extended ORPort message. */ +typedef struct ext_or_cmd_t { + uint16_t cmd; /** Command type */ + uint16_t len; /** Body length */ + char body[FLEXIBLE_ARRAY_MEMBER]; /** Message body */ +} ext_or_cmd_t; + /** A cell as packed for writing to the network. */ typedef struct packed_cell_t { - struct packed_cell_t *next; /**< Next cell queued on this circuit. */ + /** Next cell queued on this circuit. */ + TOR_SIMPLEQ_ENTRY(packed_cell_t) next; char body[CELL_MAX_NETWORK_SIZE]; /**< Cell as packed for network. */ + uint32_t inserted_time; /**< Time (in milliseconds since epoch, with high +* bits truncated) when this cell was inserted. */ } packed_cell_t; + /* This next structure may be obsoleted by inserted_time in + * packed_cell_t */ + /** Number of cells added to a circuit queue including their insertion * time on 10 millisecond detail; used for buffer statistics. */ typedef struct insertion_time_elem_t { diff --cc src/or/relay.c index 3600707,63119cb..0c9267a --- a/src/or/relay.c +++ b/src/or/relay.c @@@ -2149,75 -2133,30 +2149,80 @@@ packed_cell_copy(const cell_t *cell, i
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit adfcc1da4aac9766274275460fe2252bd9ffe4eb Merge: e6590ef 3d51545 Author: Nick Mathewson Date: Tue Dec 17 13:18:00 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/or/microdesc.c Conflict because one change was on line adjacent to line where 01206893 got fixed. changes/bug10409 |3 +++ src/or/dirvote.c |3 ++- src/or/microdesc.c|3 +-- src/or/routerparse.c | 13 ++--- src/or/routerparse.h |2 +- src/test/test_microdesc.c | 45 + 6 files changed, 62 insertions(+), 7 deletions(-) diff --cc src/or/microdesc.c index 7765d27,c4907fa..2bf6f54 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@@ -157,9 -157,8 +157,8 @@@ microdescs_add_to_cache(microdesc_cache descriptors = microdescs_parse_from_string(s, eos, allow_annotations, - copy_body); + where); - if (listed_at > 0) { + if (listed_at != (time_t)-1) { SMARTLIST_FOREACH(descriptors, microdesc_t *, md, md->last_listed = listed_at); } ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit f12d3fe9aa3d2f97eb1750e30b812358ecdd9139 Merge: adfcc1d 561d988 Author: Nick Mathewson Date: Tue Dec 17 13:54:02 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10423 |4 src/or/microdesc.c | 33 ++--- 2 files changed, 26 insertions(+), 11 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 85284c33d1952711703087eb64149ef55ea775cf Merge: f12d3fe dabdc33 Author: Nick Mathewson Date: Wed Dec 18 22:04:21 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/common/crypto.c changes/bug10402| 11 +++ src/common/crypto.c | 12 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --cc src/common/crypto.c index 5afb98e,940a756..347f27e --- a/src/common/crypto.c +++ b/src/common/crypto.c @@@ -307,28 -286,12 +307,29 @@@ crypto_global_init(int useAccel, const " setting default ciphers."); ENGINE_set_default(e, ENGINE_METHOD_ALL); } + /* Log, if available, the intersection of the set of algorithms + used by Tor and the set of algorithms available in the engine */ log_engine("RSA", ENGINE_get_default_RSA()); log_engine("DH", ENGINE_get_default_DH()); + log_engine("ECDH", ENGINE_get_default_ECDH()); + log_engine("ECDSA", ENGINE_get_default_ECDSA()); + log_engine("RAND", ENGINE_get_default_RAND()); + log_engine("RAND (which we will not use)", ENGINE_get_default_RAND()); log_engine("SHA1", ENGINE_get_digest_engine(NID_sha1)); - log_engine("3DES", ENGINE_get_cipher_engine(NID_des_ede3_ecb)); - log_engine("AES", ENGINE_get_cipher_engine(NID_aes_128_ecb)); + log_engine("3DES-CBC", ENGINE_get_cipher_engine(NID_des_ede3_cbc)); + log_engine("AES-128-ECB", ENGINE_get_cipher_engine(NID_aes_128_ecb)); + log_engine("AES-128-CBC", ENGINE_get_cipher_engine(NID_aes_128_cbc)); +#ifdef NID_aes_128_ctr + log_engine("AES-128-CTR", ENGINE_get_cipher_engine(NID_aes_128_ctr)); +#endif +#ifdef NID_aes_128_gcm + log_engine("AES-128-GCM", ENGINE_get_cipher_engine(NID_aes_128_gcm)); +#endif + log_engine("AES-256-CBC", ENGINE_get_cipher_engine(NID_aes_256_cbc)); +#ifdef NID_aes_256_gcm + log_engine("AES-256-GCM", ENGINE_get_cipher_engine(NID_aes_256_gcm)); +#endif + #endif } else { log_info(LD_CRYPTO, "NOT using OpenSSL engine support."); ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit bbc85b18ca9c3e50fedd783e34f4a866a4960922 Merge: b98c588 2c956f0 Author: Nick Mathewson Date: Sat Dec 21 21:16:06 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10456|6 ++ src/or/circuituse.c |2 +- 2 files changed, 7 insertions(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 6276cca8ce15c442f9eb7a45649b6bb377daefc2 Merge: 1cc3bb3 59a162f Author: Nick Mathewson Date: Sun Dec 22 17:26:25 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10465 |3 +++ src/or/connection_edge.c | 46 ++ 2 files changed, 41 insertions(+), 8 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 3121a6d0c8c8c3f7c01f09120dbe9c4f5a8adfdb Merge: 107b347 3511549 Author: Nick Mathewson Date: Mon Dec 23 19:01:29 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug10470 |4 doc/tor.1.txt|3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 045c989d037058293e9320db7c7d8143d5d3aa4c Merge: dc4ccfd 74c3394 Author: Nick Mathewson Date: Fri Mar 1 10:19:19 2013 -0500 Merge remote-tracking branch 'origin/maint-0.2.4' ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 4235425fce7f3c1feeba8e7b41b7e2e3372bda9a Merge: 62ef02a 301faf2 Author: Nick Mathewson Date: Sun Mar 10 19:53:31 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/channel.c |8 +++--- src/or/circuitbuild.c|2 +- src/or/circuitlist.c | 30 +++--- src/or/circuitmux.c | 22 src/or/circuituse.c | 61 -- src/or/command.c | 34 + src/or/connection_edge.c | 12 src/or/connection_or.c |1 - src/or/cpuworker.c |5 +-- src/or/rendclient.c | 12 src/or/rendmid.c | 58 ++-- src/or/rendservice.c | 54 ++-- 12 files changed, 154 insertions(+), 145 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit e4c5001bad3729ab187ad1ba0e2bfd6912786756 Merge: 4235425 8b4195f Author: Nick Mathewson Date: Sun Mar 10 23:00:13 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/routerset.c |2 +- src/or/transports.c |8 2 files changed, 5 insertions(+), 5 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit aa3126b5b4c1d3144941f069afbaa83b9bf99e20 Merge: e4c5001 e270a06 Author: Nick Mathewson Date: Sun Mar 10 23:03:17 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/6783_big_hammer |6 ++ src/or/config.c |5 + src/or/directory.c | 13 + src/or/or.h | 11 +++ 4 files changed, 35 insertions(+), 0 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 2a02efb601e287722159c6754a1b20085faebd93 Merge: 331e4dc ef4db31 Author: Nick Mathewson Date: Mon Mar 11 13:32:35 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/geoip-mar2013 |3 + src/config/geoip |92875 + 2 files changed, 85446 insertions(+), 7432 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 9be3389dc70fc36c29f8ba97c7d642eecb8a5789 Merge: d89b8e0 653b09e Author: Nick Mathewson Date: Thu Mar 14 12:06:58 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8477-easypart |3 +++ configure.ac |2 +- src/or/circuitlist.c |3 +++ 3 files changed, 7 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 2810753928692ca86820f4df3b4a76caf2701d33 Merge: 9be3389 10fb339 Author: Nick Mathewson Date: Fri Mar 15 11:01:06 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8014 |5 + configure.ac|4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit ed600832d9fcd9ac6b2aacd36114f65ff227daf9 Merge: 2810753 aa051b7 Author: Nick Mathewson Date: Fri Mar 15 11:18:58 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' doc/asciidoc-helper.sh |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit b163e801bcc96f4720a0ac2bf1ade5eb2701a9c1 Merge: ed60083 0cf327d Author: Nick Mathewson Date: Fri Mar 15 12:20:17 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/or/routerlist.c changes/bug7280|4 + doc/contrib/incentives.txt | 479 src/common/container.h |5 - src/common/crypto.c|4 +- src/common/util.c | 109 -- src/common/util.h |6 - src/or/dirserv.h |1 - src/or/hibernate.c |4 - src/or/main.c |4 - src/or/networkstatus.c | 12 - src/or/networkstatus.h |1 - src/or/or.h|9 - src/or/rendcommon.c|7 - src/or/rendcommon.h|1 - src/or/routerlist.c|1 - src/or/transports.c|4 - src/test/test.c|5 - src/test/test_dir.c|2 - src/test/test_util.c | 73 src/tools/tor-fw-helper/tor-fw-helper-natpmp.c | 14 +- src/tools/tor-fw-helper/tor-fw-helper.c|2 +- 21 files changed, 16 insertions(+), 731 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit f48daef299c7289ff867e1fc8b56834c8d96ece5 Merge: b163e80 8b4728e Author: Nick Mathewson Date: Fri Mar 15 12:38:55 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8180 |7 +++ src/or/config.c |8 2 files changed, 11 insertions(+), 4 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 3fa9c9b68891a126604bc4cc1e75d63fd53f07b7 Merge: f48daef eb94200 Author: Nick Mathewson Date: Mon Mar 18 14:24:30 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8464 |5 + src/or/routerparse.c |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a770e1cc22e416b84dcc4e8c81fcec5483d2d00c Merge: 3fa9c9b 57ffef3 Author: Nick Mathewson Date: Mon Mar 18 14:30:28 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug6206 |6 + src/common/compat.c | 54 ++ src/common/compat.h |2 +- src/ext/eventdns.c |7 +- src/or/connection.c | 23 + src/or/cpuworker.c |7 - 6 files changed, 81 insertions(+), 18 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 15127476561a18a7074d8022f7b80ddfabbdc29b Merge: a770e1c 173efa1 Author: Nick Mathewson Date: Mon Mar 18 14:32:18 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8059 |6 ++ src/or/channeltls.c |2 +- 2 files changed, 7 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit f15d9cf5db290f4e1c9ee80214674414238eabff Merge: 1512747 26639b7 Author: Nick Mathewson Date: Mon Mar 18 14:50:36 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8231 |5 + src/or/circuitbuild.c |1 + src/or/entrynodes.c | 31 ++- src/or/or.h |7 +++ src/or/routerlist.c |3 +++ 5 files changed, 46 insertions(+), 1 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 617d71a63948cbd60fa68e592fdd875aa63832e1 Merge: f15d9cf 7e9b6a1 Author: Nick Mathewson Date: Mon Mar 18 15:07:17 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8290 |9 + contrib/include.am |3 --- contrib/tor-tsocks.conf | 13 - doc/tor.1.txt |2 +- doc/torify.1.txt| 18 +++--- 5 files changed, 13 insertions(+), 32 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 41cff47c6a9807d278fcde75c7dc04da876fb556 Merge: 617d71a 3f837d4 Author: Nick Mathewson Date: Mon Mar 18 15:16:11 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8203 |4 src/or/connection_edge.c | 15 +-- src/or/control.c | 10 +++--- src/or/dnsserv.c | 10 -- src/or/dnsserv.h |2 +- 5 files changed, 25 insertions(+), 16 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 67709398b6bb1cea68b8c2a0060b251e8dfa86ee Merge: 41cff47 5959d1c Author: Nick Mathewson Date: Mon Mar 18 15:18:56 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8273 |3 + changes/bug8435 |4 + src/or/config.c |1 + src/or/dirserv.c| 288 --- src/or/dirserv.h| 13 +++ src/or/or.h |4 + src/test/test_dir.c | 78 ++ 7 files changed, 375 insertions(+), 16 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit a88f3e24eaf2180ac2f374df81b0261661774c5f Merge: 6770939 2ac66e5 Author: Nick Mathewson Date: Mon Mar 18 15:29:32 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' Conflicts: src/test/test_addr.c changes/bug8377 |3 +++ src/common/address.c |3 ++- src/test/test_addr.c | 36 3 files changed, 41 insertions(+), 1 deletions(-) diff --cc src/test/test_addr.c index f182bca,fec85a4..106f921 --- a/src/test/test_addr.c +++ b/src/test/test_addr.c @@@ -853,90 -844,40 +853,125 @@@ test_virtaddrmap(void *data } static void +test_addr_localname(void *arg) +{ + (void)arg; + tt_assert(tor_addr_hostname_is_local("localhost")); + tt_assert(tor_addr_hostname_is_local("LOCALHOST")); + tt_assert(tor_addr_hostname_is_local("LocalHost")); + tt_assert(tor_addr_hostname_is_local("local")); + tt_assert(tor_addr_hostname_is_local("LOCAL")); + tt_assert(tor_addr_hostname_is_local("here.now.local")); + tt_assert(tor_addr_hostname_is_local("here.now.LOCAL")); + + + tt_assert(!tor_addr_hostname_is_local(" localhost")); + tt_assert(!tor_addr_hostname_is_local("www.torproject.org")); + done: + ; +} + +static void +test_addr_dup_ip(void *arg) +{ + char *v = NULL; + (void)arg; +#define CHECK(ip, s) do { \ +v = tor_dup_ip(ip); \ +tt_str_op(v,==,(s)); \ +tor_free(v); \ + } while (0) + + CHECK(0x, "255.255.255.255"); + CHECK(0x, "0.0.0.0"); + CHECK(0x7f01, "127.0.0.1"); + CHECK(0x01020304, "1.2.3.4"); + +#undef CHECK + done: + tor_free(v); +} + +static void +test_addr_sockaddr_to_str(void *arg) +{ + char *v = NULL; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + struct sockaddr_storage ss; +#ifdef HAVE_SYS_UN_H + struct sockaddr_un sun; +#endif +#define CHECK(sa, s) do { \ +v = tor_sockaddr_to_str((const struct sockaddr*) &(sa));\ +tt_str_op(v,==,(s));\ +tor_free(v);\ + } while (0) + (void)arg; + + memset(&ss,0,sizeof(ss)); + ss.ss_family = AF_UNSPEC; + CHECK(ss, "unspec"); + + memset(&sin,0,sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_addr.s_addr = htonl(0x7f808001); + sin.sin_port = htons(1234); + CHECK(sin, "127.128.128.1:1234"); + +#ifdef HAVE_SYS_UN_H + memset(&sun,0,sizeof(sun)); + sun.sun_family = AF_UNIX; + strlcpy(sun.sun_path, "/here/is/a/path", sizeof(sun.sun_path)); + CHECK(sun, "unix:/here/is/a/path"); +#endif + + memset(&sin6,0,sizeof(sin6)); + sin6.sin6_family = AF_INET6; + memcpy(sin6.sin6_addr.s6_addr, "\x20\x00\x00\x00\x00\x00\x00\x00" + "\x00\x1a\x2b\x3c\x4d\x5e\x00\x01", 16); + sin6.sin6_port = htons(1234); + CHECK(sin6, "[2000::1a:2b3c:4d5e:1]:1234"); + + done: + tor_free(v); +} + ++static void + test_addr_is_loopback(void *data) + { + static const struct loopback_item { + const char *name; + int is_loopback; + } loopback_items[] = { + { "::1", 1 }, + { "127.0.0.1", 1 }, + { "127.99.100.101", 1 }, + { "128.99.100.101", 0 }, + { "8.8.8.8", 0 }, + { "0.0.0.0", 0 }, + { "::2", 0 }, + { "::", 0 }, + { "::1.0.0.0", 0 }, + { NULL, 0 } + }; + + int i; + tor_addr_t addr; + (void)data; + + for (i=0; loopback_items[i].name; ++i) { + tt_int_op(tor_addr_parse(&addr, loopback_items[i].name), >=, 0); + tt_int_op(tor_addr_is_loopback(&addr), ==, loopback_items[i].is_loopback); + } + + tor_addr_make_unspec(&addr); + tt_int_op(tor_addr_is_loopback(&addr), ==, 0); + + done: + ; + } + #define ADDR_LEGACY(name) \ { #name, legacy_test_helper, 0, &legacy_setup, test_addr_ ## name } @@@ -945,9 -886,7 +980,10 @@@ struct testcase_t addr_tests[] = ADDR_LEGACY(ip6_helpers), ADDR_LEGACY(parse), { "virtaddr", test_virtaddrmap, 0, NULL, NULL }, + { "localname", test_addr_localname, 0, NULL, NULL }, + { "dup_ip", test_addr_dup_ip, 0, NULL, NULL }, + { "sockaddr_to_str", test_addr_sockaddr_to_str, 0, NULL, NULL }, + { "is_loopback", test_addr_is_loopback, 0, NULL, NULL }, END_OF_TESTCASES }; ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 5124bc251a2ee7d17a52cb00865467a36f4cea9d Merge: a88f3e2 ad8a27a Author: Nick Mathewson Date: Mon Mar 18 15:39:21 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/dnsserv.c|3 ++- src/or/dnsserv.h|3 ++- src/or/entrynodes.c |2 +- 3 files changed, 5 insertions(+), 3 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 19d6650f8175744a8bd0153201ddc7d222a925af Merge: c8c86c9 eff1cfa Author: Nick Mathewson Date: Mon Mar 18 15:41:14 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug6673 |4 src/common/crypto.c |6 ++ 2 files changed, 10 insertions(+), 0 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit e5b79b5bb5b699388e6d3016f284a7a3f530c7c9 Merge: 19d6650 0b827cb Author: Nick Mathewson Date: Mon Mar 18 15:44:45 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/common/compat.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit d404b0200ff72a45d7c505a12f0ee98f89d28176 Merge: e5b79b5 aa4fcc4 Author: Nick Mathewson Date: Mon Mar 18 15:46:01 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' src/or/dirserv.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 899c2805b158e0e82ad6979a49b549793364c0d5 Merge: d404b02 dbdc994 Author: Nick Mathewson Date: Mon Mar 18 15:57:51 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug7947 |4 src/or/relay.c |8 2 files changed, 12 insertions(+), 0 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit b0f7af16156ef7d0c401485c6e7a533857f7b316 Merge: 899c280 01407f9 Author: Nick Mathewson Date: Mon Mar 18 16:34:29 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8062 |5 + src/or/or.h |4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 6e94d2fb3a11d7cba5796c1662e0c5089ad3e509 Merge: b0f7af1 597cd89 Author: Nick Mathewson Date: Mon Mar 18 16:36:52 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug6174 |6 ++ src/or/circuitbuild.c|2 +- src/or/circuitlist.c | 12 +--- src/or/circuitlist.h |2 +- src/or/circuituse.c | 36 +--- src/or/circuituse.h |1 + src/or/config.c |2 +- src/or/connection_edge.c | 18 ++ src/or/main.c|4 ++-- src/or/or.h |4 src/or/relay.c |5 ++--- 11 files changed, 62 insertions(+), 30 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit e6602f5991cc9def107eb8723444017bcdc860d1 Merge: c101ecc 4eaca17 Author: Nick Mathewson Date: Tue Mar 19 14:16:46 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug7582 |9 ++ src/or/circuitlist.c |2 + src/or/circuituse.c | 13 +++-- src/or/nodelist.c| 18 + src/or/nodelist.h|1 + src/or/or.h |4 +++ src/or/policies.c| 18 + src/or/policies.h|2 + src/or/relay.c | 68 +++-- 9 files changed, 118 insertions(+), 17 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 084c857704209572ca3dc9ffe8c1213189e35442 Merge: e6602f5 de7e99f Author: Nick Mathewson Date: Tue Mar 19 14:19:19 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8031|7 + src/or/microdesc.c | 66 +--- 2 files changed, 49 insertions(+), 24 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 01af92fedead7589ac4272558d284e0e68de7ddd Merge: 084c857 8d29866 Author: Nick Mathewson Date: Tue Mar 19 14:27:00 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug8002 |5 + src/common/compat.c | 29 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.4'
commit 60fd08f40be9bfe3e53de4e22b66f25451206f96 Merge: 01af92f 60d1442 Author: Nick Mathewson Date: Tue Mar 19 15:13:07 2013 -0400 Merge remote-tracking branch 'origin/maint-0.2.4' changes/bug7768 |3 +++ doc/tor-fw-helper.1.txt | 14 +++--- src/tools/tor-fw-helper/tor-fw-helper.c |2 +- 3 files changed, 11 insertions(+), 8 deletions(-) ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits