Commit Graph

9691 Commits

Author SHA1 Message Date
Roger Dingledine 1e1cc43b57 Merge branch 'maint-0.2.2' 2011-09-12 05:54:55 -04:00
Karsten Loesing d679ef623f Update to the September 2011 GeoIP database. 2011-09-12 11:43:51 +02:00
George Kadianakis 2e73f9b3ee Put some sense into our logging.
Transform our logging severities to something more sensible.
Remove sneaky printf()s.
2011-09-12 00:10:07 +02:00
George Kadianakis d0416ce3ec Don't warn of stray Bridges if managed proxies are still unconfigured.
With managed proxies you would always get the error message:

"You have a Bridge line using the X pluggable transport, but there
doesn't seem to be a corresponding ClientTransportPlugin line."

because the check happened directly after parse_client_transport_line()
when managed proxies were not fully configured and their transports
were not registered.

The fix is to move the validation to run_scheduled_events() and make
sure that all managed proxies are configured first.
2011-09-11 23:51:29 +02:00
George Kadianakis e8715b3041 Constification. 2011-09-11 23:35:00 +02:00
George Kadianakis de7565f87f Make check-spaces happy. 2011-09-11 23:34:36 +02:00
George Kadianakis c6811c57cb Enforce transport names being C identifiers.
Introduce string_is_C_identifier() and use it to enforce transport
names according to the 180 spec.
2011-09-11 23:34:11 +02:00
George Kadianakis 3136107421 Trivial fixes around the code.
* C90-fy.
* Remove ASN comments.
* Don't smartlist_clear() before smartlist_free().
* Plug a mem. leak.
2011-09-11 23:33:31 +02:00
Nick Mathewson 386966142e Merge remote-tracking branch 'origin/maint-0.2.2' 2011-09-11 16:25:14 -04:00
George Kadianakis 9a42ec6857 Be more defensive in get_transport_bindaddr().
Make sure that lines in get_transport_bindaddr() begin with the name
of the transport and a space.
2011-09-11 21:33:02 +02:00
George Kadianakis ebc232bb79 Fix bug in get_transport_in_state_by_name() when using strcmpstart().
We now split the state lines into smartlists and compare the token
properly. Not that efficient but it's surely correct.
2011-09-11 21:22:37 +02:00
George Kadianakis 2703e41d8b Improve how we access or_state_t.
* Use get_or_state()->VirtualOption instead of relying on
  config_find_option(), STRUCT_VAR_P and voodoo.
2011-09-11 20:57:01 +02:00
George Kadianakis 0dcf327248 Remove connection_uses_transport() since it was unused. 2011-09-11 20:33:27 +02:00
George Kadianakis 9bf34eb65b Allow interwined {Client,Server}TransportPlugin lines. 2011-09-11 20:30:08 +02:00
George Kadianakis a002f0e7c0 Update the transports.c documentation based on the new data. 2011-09-11 20:29:52 +02:00
George Kadianakis 1e92b24889 Update transports.[ch] to support SIGHUPs. 2011-09-11 20:29:12 +02:00
George Kadianakis fa514fb207 Prepare circuitbuild.[ch] and config.[ch] for SIGHUPs.
* Create mark/sweep functions for transports.
* Create a transport_resolve_conflicts() function that tries to
  resolve conflicts when registering transports.
2011-09-11 20:28:47 +02:00
George Kadianakis 782810a8bf Introduce tor_terminate_process() function. 2011-09-11 20:26:01 +02:00
Roger Dingledine cca806c56c fix whitespace (two-space indent) 2011-09-11 01:33:04 -04:00
Robert Ransom 8ea6d29fe4 Demote 'INTRODUCE2 cell is too {old,new}' message to info level 2011-09-10 21:56:05 -04:00
Robert Ransom b10735903b Demote HS 'replay detected' log message for DH public keys to info level 2011-09-10 21:56:05 -04:00
Robert Ransom 07a5cf285a Describe rend_service_descriptor_t more completely 2011-09-10 19:09:01 -04:00
Robert Ransom aa900b17ca Describe rend_intro_point_t more completely 2011-09-10 19:05:53 -04:00
Fabian Keil c6f6b567e0 Stop parse_client_port_config() from misinterpreting FooListenAddress and FooPort in legacy syntax
Previously the FooPort was ignored and the default used instead,
causing Tor to bind to the wrong port if FooPort and the default
port don't match or the CONN_TYPE_FOO_LISTENER has no default port.

Fixes #3936.
2011-09-10 17:48:37 -04:00
Fabian Keil 087e0569c3 Fix whitespace in parse_client_port_config() 2011-09-10 17:48:36 -04:00
Nick Mathewson 35f9be7d04 Merge remote-tracking branch 'rransom-tor/typo-fix-ohkah8Ah' 2011-09-10 17:45:27 -04:00
Robert Ransom c621e52883 Fix log message typo. 2011-09-10 16:15:52 -04:00
George Kadianakis c852760b80 Replaced some leftover assert()s with tor_assert()s. 2011-09-10 00:45:28 +02:00
Nick Mathewson a41f1fc612 Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	configure.in
	src/or/circuitbuild.c
2011-09-09 12:58:12 -04:00
Nick Mathewson b0695c11eb Merge remote-tracking branch 'public/gcc-295-fix' into maint-0.2.2 2011-09-09 12:54:27 -04:00
Nick Mathewson 4467799f45 Merge remote-tracking branch 'public/enhance_replay_detection' into maint-0.2.2 2011-09-09 12:53:45 -04:00
Nick Mathewson cb9226bcdb Check for replays in PK-encrypted part of intro cell, not just in the g^x value 2011-09-09 12:49:47 -04:00
Nick Mathewson d3ff167e09 Fix whitespace issues in patches merged today so far 2011-09-07 20:26:58 -04:00
Nick Mathewson 9bdde89027 Make the unit tests pass again after the bug2003 fix 2011-09-07 17:48:21 -04:00
Jérémy Bobbio 58a0afe30f chown() sockets when User option is set
Fixes bug 3421
2011-09-07 15:49:01 -04:00
Nick Mathewson 5c53a0f867 fix a const warning 2011-09-07 15:06:01 -04:00
Nick Mathewson 3e3480d704 Report reason for generating descriptor in an HTTP header
Suggested by arma; based on 3327.
2011-09-07 15:03:28 -04:00
Nick Mathewson ed463404e9 Clean up HTTP request header generation a little
Use a list of headers rather than trying to printf every header that
might exist.
2011-09-07 15:02:02 -04:00
Nick Mathewson 1f4b6944c0 Upload descriptors more often when recent desc is unlisted
Right now we only force a new descriptor upload every 18 hours.
This can make servers become unlisted if they upload a descriptor at
time T which the authorities reject as being "too similar" to one
they uploaded before. Nothing will actually make the server upload a
new descriptor later on, until another 18 hours have passed.

This patch changes the upload behavior so that the 18 hour interval
applies only when we're listed in a live consensus with a descriptor
published within the last 18 hours.  Otherwise--if we're not listed
in the live consensus, or if we're listed with a publication time
over 18 hours in the past--we upload a new descriptor every 90
minutes.

This is an attempted bugfix for #3327.  If we merge it, it should
obsolete #535.
2011-09-07 15:01:52 -04:00
Nick Mathewson 41eef6680e Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	src/or/dirserv.c
	src/or/networkstatus.c

Conflicts were related to routerinfo->node shift.
2011-09-07 14:51:55 -04:00
Nick Mathewson dfa6cde4d4 Merge remote-tracking branch 'public/bug2649_squashed' into maint-0.2.2 2011-09-07 14:43:06 -04:00
Nick Mathewson d27874a4f2 Remove a now-needless test. 2011-09-07 14:18:32 -04:00
Nick Mathewson 0cb01f5c97 Merge remote-tracking branch 'public/split_entry_conn'
Conflicts:
	src/or/connection.c
	src/or/connection_edge.c
	src/or/connection_edge.h
	src/or/dnsserv.c

Some of these were a little tricky, since they touched code that
changed because of the prop171 fixes.
2011-09-07 14:13:57 -04:00
Robert Ransom 8aad677bb7 Die if tor_vasprintf fails in connection_printf_to_buf
tor_asprintf already asserts if it fails.
2011-09-07 12:14:58 -04:00
Nick Mathewson 947012e153 Merge remote-tracking branch 'public/bug3851' 2011-09-07 11:22:24 -04:00
Nick Mathewson 9ef2cd7776 Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	src/or/connection_edge.c

Conflicted on a router->node transition; fix was easy.
2011-09-06 20:55:31 -04:00
Nick Mathewson 2bf0e7479b Fix assertion in addressmap_clear_excluded_trackexithosts
Fixes bug 3923; bugfix on 0.2.2.25-alpha; bugfix from 'laruldan' on trac.
2011-09-06 20:26:20 -04:00
Roger Dingledine 7ca16affb5 bump to 0.2.3.3-alpha-dev 2011-09-02 07:41:55 -04:00
Roger Dingledine f68cd4a175 bump to 0.2.3.3-alpha 2011-09-02 06:23:28 -04:00
Steven Murdoch f5df96c94f Handle test case where fgets() sees EOF on the last read
On some platforms, with non-blocking IO, on EOF you first
get EAGAIN, and then on the second read you get zero bytes
and EOF is set. However on others, the EOF flag is set as
soon as the last byte is read. This patch fixes the test
case in the latter scenario.
2011-09-01 18:17:54 +01:00