Nick Mathewson
ced06a8009
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-05-15 19:56:40 -04:00
Nick Mathewson
d29c2eb921
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
2011-05-15 19:56:27 -04:00
Nick Mathewson
10d670674a
Another doc tweak on tor_memcmp: <b>b</b>, not <b>.
2011-05-15 19:56:05 -04:00
Roger Dingledine
b48f83ab8c
minor tweaks to 4b19730c82
2011-05-15 19:20:42 -04:00
Nick Mathewson
37e3fb8af2
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/connection_edge.c
2011-05-15 11:44:51 -04:00
Nick Mathewson
2253697a04
New smartlist function to see if two lists of strings are equal.
...
We'll use this to detect changes in CSV options.
2011-05-13 16:18:53 -04:00
Nick Mathewson
600744b4be
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/config.c
src/or/dirserv.c
src/or/or.h
2011-05-13 10:48:07 -04:00
Nick Mathewson
28cc7b0180
Add a new "tor_sockaddr_to_str()" function
...
It does what it says on the tin. It turns out I'll want this in a couple
of places.
2011-05-13 10:41:18 -04:00
Robert Ransom
c714a098ea
Improve a documentation comment
2011-05-12 02:57:09 -07:00
Robert Ransom
cb9df5e53c
Fix comment typo
2011-05-12 00:27:19 -07:00
Nick Mathewson
9fba014e3f
Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023
...
Conflicts in various places, mainly node-related. Resolved them in
favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022.
src/common/Makefile.am
src/or/circuitlist.c
src/or/connection_edge.c
src/or/directory.c
src/or/microdesc.c
src/or/networkstatus.c
src/or/router.c
src/or/routerlist.c
src/test/test_util.c
2011-05-11 16:39:45 -04:00
Nick Mathewson
0cbcbc3412
Re-apply the automated conversion to 0.2.2 to make handle any memcmps that snuck in
2011-05-11 16:27:27 -04:00
Nick Mathewson
44ad734573
Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcmp_022
...
Conflicts throughout. All resolved in favor of taking HEAD and
adding tor_mem* or fast_mem* ops as appropriate.
src/common/Makefile.am
src/or/circuitbuild.c
src/or/directory.c
src/or/dirserv.c
src/or/dirvote.c
src/or/networkstatus.c
src/or/rendclient.c
src/or/rendservice.c
src/or/router.c
src/or/routerlist.c
src/or/routerparse.c
src/or/test.c
2011-05-11 16:24:29 -04:00
Nick Mathewson
59f9097d5c
Hand-conversion and audit phase of memcmp transition
...
Here I looked at the results of the automated conversion and cleaned
them up as follows:
If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I
changed it to a fast_memcmp or fast_memeq.
Otherwise if there was a tor_memcmp that could turn into a
tor_memneq or tor_memeq, I converted it.
This wants close attention.
[*] I'm erring on the side of caution here, and leaving some things
as tor_memcmp that could in my opinion use the data-dependent
fast_memcmp variant.
2011-05-11 16:12:51 -04:00
Nick Mathewson
db7b2a33ee
Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq
...
This commit is _exactly_ the result of
perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch]
perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch]
git checkout src/common/di_ops.[ch]
git checkout src/or/test.c
git checkout src/common/test.h
2011-05-11 16:12:51 -04:00
Nick Mathewson
1d703ed22b
Add a "di_ops.h" include to util.h
2011-05-11 16:12:51 -04:00
Nick Mathewson
4b19730c82
Add a data-independent variant of memcmp and a d-i memeq function.
...
The tor_memcmp code is by Robert Ransom, and the tor_memeq code is
by me. Both incorporate some ideas from DJB's stuff.
2011-05-11 16:12:33 -04:00
Robert Ransom
b7452dcbcb
Fix comment typo
2011-05-10 05:15:02 -07:00
Nick Mathewson
1065a5ef29
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-05-05 21:54:04 -04:00
Nick Mathewson
330116f034
Fix up some check-spaces issues
2011-05-05 21:53:46 -04:00
Nick Mathewson
8b33928676
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-04-28 17:15:31 -04:00
John Brooks
2dc9546eef
Correct the logic from f14754fbd for tor_gmtime_r
2011-04-28 17:13:45 -04:00
Nick Mathewson
51e551d383
Detect and handle NULL returns from (gm/local)time_r
...
These functions can return NULL for otherwise-valid values of
time_t. Notably, the glibc gmtime manpage says it can return NULL
if the year if greater than INT_MAX, and the windows MSDN gmtime
page says it can return NULL for negative time_t values.
Also, our formatting code is not guaranteed to correctly handle
years after 9999 CE.
This patch tries to correct this by detecting NULL values from
gmtime/localtime_r, and trying to clip them to a reasonable end of
the scale. If they are in the middle of the scale, we call it a
downright error.
Arguably, it's a bug to get out-of-bounds dates like this to begin
with. But we've had bugs of this kind in the past, and warning when
we see a bug is much kinder than doing a NULL-pointer dereference.
Boboper found this one too.
2011-04-28 17:12:54 -04:00
Nick Mathewson
26456d3354
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-04-27 22:14:54 -04:00
Nick Mathewson
0130e7c9d2
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/common/torint.h
2011-04-27 22:14:28 -04:00
Nick Mathewson
43ffd023e9
Make SIZE_T_CEILING unsigned; add a signed SSIZE_T_CEILING
...
None of the comparisons were _broken_ previously, but avoiding
signed/unsigned comparisons makes everybody happier.
Fixes bug2475.
2011-04-26 13:03:58 -04:00
Nick Mathewson
4a7f979b54
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-04-19 12:41:01 -04:00
Nick Mathewson
5cc322e547
Standardize our printf code on %d, not %i.
2011-04-19 12:40:29 -04:00
Nick Mathewson
99c2bfe76b
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/rephist.c
2011-04-08 13:37:57 -04:00
Nick Mathewson
1be1221385
Free pending_cb_messages on exit
2011-04-07 15:25:33 -04:00
Nick Mathewson
67d88a7d60
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/address.c
src/common/compat_libevent.c
src/common/memarea.c
src/common/util.h
src/or/buffers.c
src/or/circuitbuild.c
src/or/circuituse.c
src/or/connection.c
src/or/directory.c
src/or/networkstatus.c
src/or/or.h
src/or/routerlist.c
2011-04-07 12:17:20 -04:00
Nick Mathewson
ba0cd8094f
Merge remote-tracking branch 'public/xxx_fixups' into maint-0.2.2
...
Conflicts:
src/or/or.h
2011-04-07 12:03:04 -04:00
Nick Mathewson
ee871e7a0e
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/compat.h
src/or/circuitlist.c
src/or/circuituse.c
src/or/or.h
src/or/rephist.c
2011-03-30 14:55:50 -04:00
Nick Mathewson
5eaba5ac21
Implement replacements for timer(add,cmp,sub) on platforms lacking them.
2011-03-30 14:41:41 -04:00
Sebastian Hahn
9facf8918f
Improve a few comments
2011-03-28 19:28:04 +02:00
Nick Mathewson
05887f10ff
Triage the XXX022 and XXX021 comments remaining in the code
...
Remove some, postpone others, leave some alone. Now the only
remaining XXX022s are ones that seem important to fix or investigate.
2011-03-25 18:32:27 -04:00
Nick Mathewson
c4bd067359
Comment out ancient asserts for bug 930; resolve an xxx021
2011-03-25 16:28:38 -04:00
Nick Mathewson
41380fa3b3
Fixup tor_addr_to_sockaddr return convention
2011-03-25 16:28:38 -04:00
Nick Mathewson
88bb40d8f8
Clean up a comment-conversation about bad libevent version/method combos
2011-03-25 16:28:38 -04:00
Nick Mathewson
444e46d96d
Remove the "fuzzy time" code
...
It was the start of a neat idea, but it only got used in 3 places,
none of which really needed it.
2011-03-25 16:28:37 -04:00
Nick Mathewson
1db6eb6cb7
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-03-16 18:10:24 -04:00
Nick Mathewson
721954b3a2
Resolve the one DOCDOC in the 0.2.2 code atm
2011-03-16 18:07:55 -04:00
Nick Mathewson
b1b6552251
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/crypto.c
2011-03-16 17:16:54 -04:00
Nick Mathewson
3310dd2358
Clean up whitespace
2011-03-16 17:11:30 -04:00
Nick Mathewson
57b954293e
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Trivial Conflicts in
src/common/crypto.c
src/or/main.h
src/or/or.h
2011-03-16 17:09:32 -04:00
Nick Mathewson
6617822b84
Doxygen documentation for about 100 things that didn't have any
...
About 860 doxygen-less things remain in 0.2.2
2011-03-16 17:05:37 -04:00
Nick Mathewson
7f6af7a602
Fix up all doxygen warnings other than "foo is not documented"
2011-03-16 14:47:27 -04:00
Nick Mathewson
26009a3ed0
Merge remote branch 'origin/maint-0.2.2'
2011-03-07 17:12:08 -05:00
Sebastian Hahn
f83debb51d
Fix setting target port in get_interface_address6
...
We want to use the discard port correctly, so a htons() was missing.
Also we need to set it correctly depending on address family.
Review provided by danieldg
2011-03-05 16:58:20 +01:00
Sebastian Hahn
865ea5d263
Fix connect() failures in get_interface_address6()
...
The third argument for connect should be dependent on the address
family. Issue spotted by piebeer who also wrote the patch.
2011-03-05 16:57:05 +01:00