Commit Graph

5888 Commits

Author SHA1 Message Date
Nick Mathewson
145ead96ed Do not cannibalize a circuit that has run out of RELAY_EARLY cells. Partial bug 878 fix.
svn:r17814
2008-12-29 19:55:13 +00:00
Nick Mathewson
a332805a55 Extact parse-the-token-arguments to its own function, and change it to a single-pass algorithm. This simplifies the parsing code and speeds it up a little.
svn:r17812
2008-12-29 16:54:56 +00:00
Nick Mathewson
fa6e72dc4b Remove a call to find_whitespace_eos that didn't actually do anything.
svn:r17811
2008-12-29 16:54:51 +00:00
Nick Mathewson
a42e82b0de While I'm at it, refactor control.c a little so that the dead code no longer exists.
svn:r17810
2008-12-29 14:21:25 +00:00
Nick Mathewson
272b007268 coverity thinks it's dumb to check networkstatus_v2_list in one place and not another. Coverity has a point, even though the check may be redundant. CID 361.
svn:r17809
2008-12-29 14:06:47 +00:00
Nick Mathewson
2c4097e99d More compilation tweaks on Android: fix two clear errors in our code that apparently the compiler cares about there.
svn:r17808
2008-12-29 04:01:58 +00:00
Nick Mathewson
e8a3fa91a6 Use a consistent naming standard for header file guard macros, taking care not to collide with any system headers. This tripped us up on Android.
svn:r17805
2008-12-29 02:21:02 +00:00
Nick Mathewson
46f8ef8116 Switch address comparisons in policies to be exact rather than semantic. Until we do ipv6 exit policies and until we know whether we even allow ::ffff:0:0/96 addresses, there is no point in doing "semantic" comparisons. This was also showing up on oprofile.
svn:r17803
2008-12-29 01:47:33 +00:00
Nick Mathewson
870fd18b8f Refactor some exit-policy-related functions that showed up in oprofile.
Specifically, split compare_tor_addr_to_addr_policy() from a loop with a bunch
of complicated ifs inside into some ifs, each with a simple loop.  Rearrange
router_find_exact_exit_enclave() to run a little faster.  Bizarrely,
router_policy_rejects_all() shows up on oprofile, so precalculate it per
routerinfo.

svn:r17802
2008-12-29 01:47:28 +00:00
Nick Mathewson
ae71b52945 remove the responsibility for setting listensocklen to the function that made the sockaddr
svn:r17799
2008-12-27 15:46:13 +00:00
Roger Dingledine
365c72246c partial move to letting bridge descriptor fetches use our new (well,
new from their perspective) directory download schedule abstraction.

not done yet, but i'd better get this out of my sandbox before nick
does another sweeping change. :)


svn:r17798
2008-12-27 07:30:47 +00:00
Roger Dingledine
5519e633ec New controller event "clients_seen" to report a geoip-based summary
of which countries we've seen clients from recently. Now controllers
like Vidalia can show bridge operators that they're actually making
a difference.


svn:r17796
2008-12-27 06:50:07 +00:00
Nick Mathewson
0c5e03fa21 Remove a deprecated controller alias; make another one generate a warning.
svn:r17793
2008-12-27 00:20:08 +00:00
Nick Mathewson
a87335472c Make connection_create_listener take a sockaddr_len, not just a sockaddr whose length we try to divine.
svn:r17792
2008-12-27 00:20:06 +00:00
Nick Mathewson
b3b14bf25d Add some early checks to keep ipv6 addresses from failing by accident. Now, they fail on purpose, at least till 0.2.2.something.
svn:r17791
2008-12-26 22:51:25 +00:00
Nick Mathewson
61722638ea Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0.
svn:r17788
2008-12-26 20:37:18 +00:00
Nick Mathewson
f7adc017c4 Document and make more conservative the logic for picking the size of the bloom filter to use for retaining descriptors.
svn:r17786
2008-12-26 17:35:36 +00:00
Nick Mathewson
0f9f45ff33 Document the pk operation count fields in rephist.c, and move them into a struct for clarity, and change their type to what we actually want to cast them to.
svn:r17784
2008-12-26 17:35:12 +00:00
Nick Mathewson
df5e8f65bc Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
svn:r17783
2008-12-26 17:35:08 +00:00
Roger Dingledine
2a42986c96 ok, fair enough, some of these variables were time_t's after all
svn:r17777
2008-12-25 20:16:22 +00:00
Roger Dingledine
4ff04fda77 so which is it? TIME_MAX or INT_MAX? pick INT_MAX for now.
svn:r17772
2008-12-25 15:42:03 +00:00
Roger Dingledine
a12c3f2c86 some fixes i found in my sandbox
svn:r17771
2008-12-25 15:37:47 +00:00
Nick Mathewson
272e64e674 Use the literal parse of an address in dns_resolve_impl if parsing the address as an ipv4 or ipv6 address _succeeded_. Not if it failed. Bug introduced in r17707 (post 0.2.1.8-alpha), and found by xiando.
svn:r17758
2008-12-24 02:38:07 +00:00
Nick Mathewson
df608fef45 Checkpoint my big bug-891 patch.
svn:r17757
2008-12-24 02:38:04 +00:00
Nick Mathewson
ac2f6b608a Patch from Sebiastian for bug 888: mark a descriptor as "Impossible" if we reject it after downloading it so that we do not download it again
svn:r17756
2008-12-23 21:17:52 +00:00
Nick Mathewson
e6bf9fdf94 Remove bogus extern declaration for unused (and nonexistant) field from test.c
svn:r17755
2008-12-23 17:56:39 +00:00
Nick Mathewson
558e9899e4 Document most undocumented variables.
svn:r17754
2008-12-23 17:56:31 +00:00
Nick Mathewson
b4d387c28b Make freelist_len in memarea.c static; document a few variables.
svn:r17741
2008-12-22 19:14:08 +00:00
Nick Mathewson
7d79bec54d Expose bench_* functions via test cli
svn:r17740
2008-12-22 19:00:09 +00:00
Nick Mathewson
b68379b13b Add DOCDOC entries for undocumented static and global variables.
svn:r17739
2008-12-22 19:00:05 +00:00
Nick Mathewson
43b111535a Make doxygen not complain about the way we spell CRLFNUL in control.c
svn:r17735
2008-12-22 17:53:30 +00:00
Nick Mathewson
1e5f457461 Fix most DOCDOCs remaining and/or added by redox.
svn:r17734
2008-12-22 17:53:04 +00:00
Nick Mathewson
167d266dbf Documentation and conformance for WRA_* returns.
shahn: "Add some documentation for the WRA_* family of functions, also make
sure that (hopefully) all functions that return was_router_added_t
don't return ints directly and that they don't refer to integers in
their documentation anymore."

svn:r17731
2008-12-22 16:37:20 +00:00
Nick Mathewson
1e666bfcc1 Partially apply bug 891 parch from forest: check EXTEND cell address against real_addr, not addr. I have questions about the rest of the patch: see the flyspray entry.
svn:r17730
2008-12-22 16:22:04 +00:00
Nick Mathewson
1725c0c8a5 Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen.
svn:r17729
2008-12-22 14:56:28 +00:00
Nick Mathewson
55348884b5 Fix all of the doxygen warnings not pertaining to missing documentation.
svn:r17727
2008-12-22 14:56:16 +00:00
Roger Dingledine
df89748388 fix typo noticed by wood
svn:r17726
2008-12-22 09:52:56 +00:00
Roger Dingledine
0f6514e041 some windows users are outraged that tor refuses to work even
when their clock and date are correct, if their timezone is
totally wrong. now we at least tell them.


svn:r17725
2008-12-22 09:10:06 +00:00
Roger Dingledine
0c6ff7d990 the default should not be the notify the poster, unless something
more extreme happens. the default should be to be quiet unless
something more extreme happens.

at least, this doesn't generate complaints anymore. perhaps that
means it is working better? :)


svn:r17724
2008-12-22 06:25:49 +00:00
Roger Dingledine
7262bf5eab fix a fun bug on r17656 that was making us send HTTP/1.0 404 as
the message body, no matter the message headers, when answering
a descriptor or extrainfo post request.


svn:r17723
2008-12-22 06:21:28 +00:00
Nick Mathewson
e36c7a74bd Yet still more propagating of things that need to be was_router_added_t now.
svn:r17722
2008-12-22 05:21:49 +00:00
Nick Mathewson
98a376fab1 More propagating of things that need to be was_router_added_t now.
svn:r17721
2008-12-22 04:53:11 +00:00
Nick Mathewson
df22dcb602 WRA_MORE_SEVERE is not WRA_GET_MORE_SEVERE.
svn:r17720
2008-12-22 04:36:52 +00:00
Karsten Loesing
61055ae719 gabelmoo has a new IP address (once more).
svn:r17717
2008-12-22 00:48:10 +00:00
Nick Mathewson
029be5ad02 Move in-addr.arpa parsing and generation into address.c, and simplify the code that does it elsewhere. Incidentally, this lets exit servers answer requests for ip6.arpa addresses.
svn:r17707
2008-12-19 18:52:00 +00:00
Nick Mathewson
a259af179b When we need to open a new origin circuit, log why.
svn:r17705
2008-12-19 18:51:49 +00:00
Nick Mathewson
16f1d4cb72 Doc RRS_DONT_REMOVE_OLD; improve router_rebuild_store documentation.
svn:r17704
2008-12-19 18:51:44 +00:00
Nick Mathewson
8c90a4b7ee More approx_time() calls. Noted by forest.
svn:r17702
2008-12-19 18:51:35 +00:00
Nick Mathewson
c67bd80487 Make cell pools always-on.
svn:r17692
2008-12-18 17:28:50 +00:00
Nick Mathewson
c3e4b12e7f Why were we using gettimeofday() in second_elapsed_callback? We were only ever looking at the tv_sec field.
svn:r17691
2008-12-18 17:19:23 +00:00