Commit Graph

176 Commits

Author SHA1 Message Date
Roger Dingledine
80f0492a65 avoid shadowing a variable so we don't get sad later.
svn:r6133
2006-03-12 04:07:21 +00:00
Roger Dingledine
5f8d26496d Let the controller attachstream conns that are in connect_wait
or resolve_wait: we detach them first and then act as before.
Resolves bug 264.


svn:r6112
2006-03-09 06:29:53 +00:00
Roger Dingledine
44107f6ec4 Implement NEWNYM. Nick, did I do a bad thing?
svn:r6105
2006-03-09 00:18:16 +00:00
Roger Dingledine
946317ae13 start using OR_CONN_EVENT_NEW.
also fixes a seg fault in tor (bug 261).


svn:r6101
2006-03-08 22:29:08 +00:00
Roger Dingledine
a2d71f917e mark bug 261
svn:r6089
2006-03-06 19:47:54 +00:00
Roger Dingledine
329af979e0 Add a new circuit purpose 'controller' to let the controller
ask for a circuit that Tor won't try to use.

Extend the EXTENDCIRCUIT controller command to let you specify
the purpose if you're starting a new circuit.

Add a new SETCIRCUITPURPOSE controller command to let you
change a circuit's purpose after it's been created.


svn:r6075
2006-02-23 06:51:09 +00:00
Roger Dingledine
16f265fa0d when saveconf fails in controller v1, we were returning a malformed
error string.


svn:r6053
2006-02-20 01:24:26 +00:00
Roger Dingledine
d113b75da6 more log conversions.
whee.


svn:r6003
2006-02-13 09:02:35 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
0fadf0aad6 Fix bug 225: now "attachstream 0" treats conn like it just connected,
doing address remapping, handling .exit and .onion idioms, and so on.

Now we are more uniform in making sure that the controller hears about
all new connections, and making sure it hears when they close.


svn:r5897
2006-02-03 11:37:19 +00:00
Roger Dingledine
4a66f5a896 when the controller asks for a signal we don't recognize, don't
include the whitespace/newline/etc in our complaint.


svn:r5841
2006-01-19 02:21:24 +00:00
Nick Mathewson
2dd566d5d5 Indirect access to the signed_descriptor field to make it easier to keep them lazily on disk.
svn:r5827
2006-01-12 18:04:17 +00:00
Roger Dingledine
7d1f675c85 entry nodes are now entry guards.
this is our last easy chance for a wholesale change. heave ho.


svn:r5782
2006-01-10 22:42:44 +00:00
Roger Dingledine
d114ea7125 implement getinfo desc/all-recent
closes bug 237.


svn:r5770
2006-01-10 20:09:31 +00:00
Nick Mathewson
bec9b705cc Instrument directory client bytes as well as server bytes.
svn:r5760
2006-01-09 23:13:53 +00:00
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +00:00
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
ea760fa149 extendcircuit and attachstream would complain about not enough
arguments, but then just keep on going anyway.


svn:r5575
2005-12-12 16:50:55 +00:00
Roger Dingledine
79f09b2f17 setconf orport=9001
513 Unrecognized option value

it's not unrecognized. it's unacceptable. (in this case, i still
have to consult the logs to figure out why, but at least i have
an inkling that maybe i should.)


svn:r5561
2005-12-11 09:33:38 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Nick Mathewson
39265dd72e In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
2005-12-09 05:37:26 +00:00
Nick Mathewson
148a1e969d Shave off another 4.7%: remove a linear search when figuring out which circuits wanted us to open a given OR connection.
svn:r5489
2005-12-03 02:12:37 +00:00
Peter Palfrader
b9d37a2d58 Add a new controller event type that allows controllers to get all
server descriptors that were uploaded to a router in its role as authoritative
dirserver.


svn:r5436
2005-11-19 18:35:43 +00:00
Roger Dingledine
4ddf2385a0 if it's not less than three does that mean it's more than two?
svn:r5422
2005-11-18 11:35:23 +00:00
Roger Dingledine
9d6d6da883 and code the part where redirectstream can take a port.
svn:r5421
2005-11-18 11:32:59 +00:00
Roger Dingledine
d2b93df26c and now we actually do it, too.
svn:r5414
2005-11-17 22:01:46 +00:00
Roger Dingledine
7dbf2511c3 when you type 'getinfo' with no arguments, it doesn't give you
any answer at all. this is clearly a bug.

the more interesting bug is whether things like setconf, getconf,
and so on should return 250 OK if you give them no arguments. should
we have a new "you didn't ask me anything" response code, or just
leave it as is?


svn:r5412
2005-11-17 21:45:38 +00:00
Roger Dingledine
279e29a1f2 bugfix: the controller doesn't mention it's a .onion if it is.
svn:r5400
2005-11-16 23:54:24 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
91a666064a Fix possible free(NULL) in control.c
svn:r5306
2005-10-25 07:02:13 +00:00
Nick Mathewson
f9b0be526e Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
svn:r5302
2005-10-24 19:39:45 +00:00
Nick Mathewson
55f2ab9cc3 Migrate a few more files to domained logging
svn:r5285
2005-10-18 22:21:29 +00:00
Nick Mathewson
3347c1741d Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
svn:r5276
2005-10-18 17:43:54 +00:00
Peter Palfrader
551e3402a3 split send_control1_event() into the printf and the print/dispatch part. The
printf part was and is limited to at most 1024 byte messages, so having the print
part separately available makes sense.


svn:r5273
2005-10-18 16:45:43 +00:00
Peter Palfrader
640211e59a Be a bit more verbose in our AUTHENTICATE error messages in the control protocol so the next guy doesn't blame Nick again
svn:r5245
2005-10-12 19:45:35 +00:00
Nick Mathewson
2b3a7b818f Add an as-yet-unused "EXTENDED" flag to SETEVENTS to indicate that the client can handle extra labeled info in its events. Add moreinfo to the "what is ready for downloading" msg so we can investigate digest-related download rules
svn:r5237
2005-10-12 04:31:44 +00:00
Roger Dingledine
be478bb56c stutter therapy lessons
svn:r5191
2005-10-05 02:09:27 +00:00
Nick Mathewson
8434595584 Fix verbose compiler warnings, including one in routerlist.c that would have been an actual error. Normalize whitespace. Enforce convention that "address" is a hostname and "addr" is an IPv4 address.
svn:r5190
2005-10-05 02:06:36 +00:00
Nick Mathewson
61ea516885 Check for named servers when looking them up by nickname;
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.

Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.

Try to list MyFamily elements by key, not by nickname.

Only warn about names that we generated ourself, or got from the local
user.

On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.


svn:r5185
2005-10-04 22:23:31 +00:00
Roger Dingledine
88c37f2d24 comment cleanups
svn:r5181
2005-10-04 06:53:59 +00:00
Nick Mathewson
fc3c0197f9 Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download.
svn:r5166
2005-09-30 20:04:55 +00:00
Nick Mathewson
c6347cdb0e suppress all our usual compiler warnings, including a longstanding one from tree.h
svn:r5149
2005-09-29 20:49:41 +00:00
Roger Dingledine
f011b12df2 bugfix: nobody ever implemented EVENT_ADDRMAP for control protocol
version 0, so don't let version 0 controllers ask for it.


svn:r5107
2005-09-21 23:30:15 +00:00
Nick Mathewson
f99b91505b Make write_escaped_data more bulletproof; backport candidate.
svn:r5106
2005-09-21 23:13:29 +00:00
Nick Mathewson
7c6679d8dc Add new config.c function to set options that can fail, and roll back if they do. This should solve the setconf-an-impossible-port bug.
svn:r5046
2005-09-14 02:36:29 +00:00
Roger Dingledine
1f930a9a70 checkpoint: clean up and document the three ways to call config_assign()
and reduce code duplication in config_free() and option_is_same().


svn:r5040
2005-09-14 02:07:35 +00:00
Nick Mathewson
63dfe2447e Fix bug found by "ca": looking up a non-existent stream for a v1 control connection would cause a segfault. (No backport needed since 0.1.0 had only v0 connections.)
svn:r5001
2005-09-12 03:32:30 +00:00
Nick Mathewson
8f37357193 Make GCC v4 happy with heavy warnings enabled.
svn:r4922
2005-09-08 06:37:50 +00:00