Commit Graph

21644 Commits

Author SHA1 Message Date
teor (Tim Wilson-Brown) d359cfab13 Update unit tests for fascist_firewall_choose_address*
Check that clients, bridge clients, and relays choose addresses
as expected.
2016-02-21 00:00:40 +11:00
teor (Tim Wilson-Brown) be16c16bda Downgrade directory preference warning to info level 2016-02-20 23:42:08 +11:00
teor (Tim Wilson-Brown) c281c03654 If both IPv4 and IPv6 addresses could be used, choose one correctly
If there is a node, use node_ipv6_or/dir_preferred().
If there is no node, use fascist_firewall_prefer_ipv6_or/dirport().
2016-02-20 23:40:37 +11:00
teor (Tim Wilson-Brown) 4afb107278 Refactor IPV6_OR_LOOKUP into fascist_firewall_choose_address_rs
It's only used once now, so having it as a macro is unhelpful.
2016-02-20 23:30:23 +11:00
teor (Tim Wilson-Brown) a4853f1bc1 Make some fascist_firewall_choose_address* functions static 2016-02-20 23:30:17 +11:00
teor (Tim Wilson-Brown) a4eddfff66 Refactor fascist_firewall_allows_address without changing behaviour 2016-02-20 20:01:51 +11:00
teor (Tim Wilson-Brown) 25543387ed Ensure relays must use IPv4, and can use IPv6
A mistake in previous refactoring had relays using IPv4 and IPv6.
2016-02-20 19:28:51 +11:00
Nick Mathewson 5494938467 Set or_ap/dir_ap.port on the invalid addr case. Bug in no released Tor. CID 1353178 and 1353179. 2016-02-16 12:58:02 -05:00
Nick Mathewson 31c96a3699 Fix a NULL dereference on unit test failure. CID 1353177. 2016-02-16 12:55:41 -05:00
Nick Mathewson 5cd6c577df Merge branch 'bug17852_revised' 2016-02-16 11:34:06 -05:00
Nick Mathewson 75daeb5c6d changes file for bug17852 2016-02-16 11:33:21 -05:00
Jeremy f48c607fd9 Harden check_private_dir() to remove any potential race.
Remove any potential race between stat() and chmod().
Replace stat() with fstat().
Replace chmod() with fchmod()
2016-02-16 11:21:46 -05:00
Jeremy 4e19133dcc src/common/util.c:expand_filename() - Perhaps use GetFullPathName() as a form of input validation on the filename argument. 2016-02-16 11:21:45 -05:00
Nick Mathewson 1f679d4ae1 Fix all doxygen warnings other than "X is not documented" 2016-02-11 22:06:44 -05:00
Nick Mathewson fed8c5199a Merge branch 'check_log_mutex_uncherrypicked' 2016-02-11 13:41:31 -05:00
teor (Tim Wilson-Brown) a7a98e27ea Initialise logging before trying to use it in unit tests 2016-02-11 13:41:25 -05:00
Nick Mathewson 5a164d50bb Add another admonishment to WritingTests.md 2016-02-11 13:17:21 -05:00
Nick Mathewson 7788ee43e5 Merge branch 'maint-0.2.7' 2016-02-11 13:04:43 -05:00
Nick Mathewson be6174f8f6 Merge branch 'maint-0.2.6' into maint-0.2.7 2016-02-11 13:01:46 -05:00
Nick Mathewson 740421af19 Merge branch 'maint-0.2.5' into maint-0.2.6 2016-02-11 13:00:25 -05:00
Nick Mathewson ce289e2cb5 Merge branch 'maint-0.2.4' into maint-0.2.5 2016-02-11 12:55:40 -05:00
Nick Mathewson ad95d64fec Merge branch 'bug18162_024' into maint-0.2.4 2016-02-11 12:55:25 -05:00
Nick Mathewson c2fd648469 Make ensure_capacity a bit more pedantically correct
Issues noted by cypherpunks on #18162
2016-02-11 12:54:52 -05:00
Nick Mathewson 838d4dee12 make check-spaces 2016-02-11 12:50:55 -05:00
Nick Mathewson 2b5ff52594 Merge branch 'feature17840-v11-tests_truncated' 2016-02-11 12:45:51 -05:00
Nick Mathewson ba2be81fc3 Merge remote-tracking branch 'teor/feature17840-v11-merged-v2' 2016-02-11 12:20:20 -05:00
Nick Mathewson cae59b913f Rename circuit_about_to_free_{terminal -> atexit} 2016-02-11 12:15:12 -05:00
Nick Mathewson 7f9ac4957c Split a long line 2016-02-11 12:13:02 -05:00
Nick Mathewson bc7a5eeeda Merge remote-tracking branch 'weasel/bug18261' 2016-02-11 12:12:02 -05:00
Nick Mathewson c0a6c34652 Merge remote-tracking branch 'teor/bug18208' 2016-02-10 16:32:05 -05:00
Nick Mathewson 162d2022e1 Merge branch 'bug17682_squashed' 2016-02-10 15:50:28 -05:00
Nick Mathewson 601b41084a Bulletproof the safe_timer_diff function
Originally it can overflow in some weird cases.  Now it should no longer
be able to do so.

Additionally, limit main's timers to 30 days rather than to 38 years;
we don't actually want any 38-year timers.

Closes bug 17682.
2016-02-10 15:49:11 -05:00
zerosion 44ea7af686 Quotes added on configure script's string comparison.
Solves #17744

The syntax has been generalized too, so there are only double quotes.

Signed-off-by: zerosion <zerosion@protonmail.ch>
2016-02-10 15:46:39 -05:00
Nick Mathewson ee75c02691 Merge remote-tracking branch 'andrea/bug18116' 2016-02-10 15:42:11 -05:00
Nick Mathewson 69c47ab5fd Merge remote-tracking branch 'sebastian/bug18242' 2016-02-10 15:38:52 -05:00
Nick Mathewson 4dc8dc4b89 Merge remote-tracking branch 'public/bug18184' 2016-02-10 15:36:48 -05:00
Nick Mathewson 2123f0a2f9 Make the callgraph module-aware 2016-02-10 15:09:10 -05:00
Andrea Shepard ae0f858602 Properly detach circuits from cmuxes when calling circuit_free_all() on shutdown again 2016-02-10 05:35:03 +00:00
Andrea Shepard 3014bfb61b Appease make check-spaces 2016-02-10 02:20:59 +00:00
Nick Mathewson 0c4fa4a923 changes file for bug18051 2016-02-08 08:35:43 -05:00
Nick Mathewson 92048a1b43 Add missing consts; my fault. 2016-02-08 08:34:18 -05:00
Nick Mathewson 9f6589d65a Merge branch 'decorated_ipv6_directory_send_command_squashed' 2016-02-08 08:33:28 -05:00
Malek 061586e36c decorated ipv6 address for directory send command 2016-02-08 08:33:18 -05:00
Nick Mathewson d004f06830 fix wide lines, use more locals. 2016-02-08 08:31:31 -05:00
Harini Kannan c30be5a82d Using router_get_my_routerinfo() 2016-02-07 16:07:35 -05:00
Peter Palfrader 42e131e9ac Fix a segfault during startup
If unix socket was configured as listener (such as a ControlSocket or a
SocksPort unix socket), and tor was started as root but not configured
to switch to another user, tor would segfault while trying to string
compare a NULL value.  Fixes bug 18261; bugfix on 0.2.8.1-alpha. Patch
by weasel.
2016-02-06 22:17:02 +01:00
Nick Mathewson 2d879bd39f Document port_out argument to tor_addr_from_sockaddr 2016-02-06 15:34:47 -05:00
Nick Mathewson 0f5f6b8a41 Merge remote-tracking branch 'yawning/bug18221' 2016-02-06 15:30:22 -05:00
Nick Mathewson b645e2f2b0 Merge remote-tracking branch 'alec/dead_code_removal' 2016-02-06 15:08:49 -05:00
Alec Heifetz 6852868b4a Removed dead code in main.c 2016-02-06 14:41:31 -05:00