aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
AgeCommit message (Collapse)Author
2007-03-29Fix a crash bug in cell queues: It is possible for a connection_write_to_buf ↵Nick Mathewson
to close the connection or otherwise unlink the circuit, which makes the circuit nonactive, which invalidates the pointer from the circuit to the next circuit on the active ring. Also add a bunch of asserts, most #ifdefed out. svn:r9915
2007-03-26 r12654@Kushana: nickm | 2007-03-25 19:03:44 -0400Nick Mathewson
Add documentation for cell queue functions; make destroy cells result in cell queues getting cleared before the destroy gets sent. svn:r9907
2007-03-26 r12652@Kushana: nickm | 2007-03-25 15:01:48 -0400Nick Mathewson
A surprisingly simple patch to stop reading on edge connections when their circuits get too full, and start again when they empty out. This lets us remove the logic to block begin_dir conns when the corresponding or conns get full: it was already broken by cell queues anyway. svn:r9905
2007-03-26 r12651@Kushana: nickm | 2007-03-24 18:26:42 -0400Nick Mathewson
Initial version of circuit-based cell queues. Instead of hammering or_conns with piles of cells, queue cells on their corresponding circuits, and append them to the or_conn as needed. This seems to work so far, but needs a bit more work. This will break the memory-use-limitation patch for begin_dir conns: the solution will be a fun but fiddly. svn:r9904
2007-03-24 r12644@0-41-wifi: nickm | 2007-03-23 16:02:23 -0400Nick Mathewson
Eliminate more redundant circuit_t arguments when edge_connection_t is already supplied and the circuit is already attached. svn:r9900
2007-03-24 r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400Nick Mathewson
Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit. svn:r9899
2007-03-04 r12074@catbus: nickm | 2007-03-04 15:11:43 -0500Nick Mathewson
Make all LD_BUG log messsages get prefixed with "Bug: ". Remove manually-generated "Bug: "s from log-messages. (Apparently, we remembered to add them about 40% of the time.) svn:r9733
2007-02-26more cleanups; getting closerRoger Dingledine
svn:r9655
2007-02-23 r11895@catbus: nickm | 2007-02-23 15:12:58 -0500Nick Mathewson
Make remap stream events have a souce; make them generated every time we get a successful connected or resolved cell. Also change reported stream target address to IP consistently when we get the IP from an exit node. svn:r9624
2007-02-12 r11775@catbus: nickm | 2007-02-12 16:39:09 -0500Nick Mathewson
Update copyright dates. svn:r9570
2007-02-07 r11673@catbus: nickm | 2007-02-06 14:40:07 -0500Nick Mathewson
Report stream end events where a resolve succeeded or where we got a socks protocol error correctly, rather than calling both of them "INTERNAL". Turn ALREADY_SOCKS_REPLIED into a flag rather than a reason. This will help debug 367 part 2 a little. svn:r9511
2007-02-05 r11641@catbus: nickm | 2007-02-05 13:59:26 -0500Nick Mathewson
Add a REMAP state to stream events so that controllers can learn exactly when the target address for a stream has changed. May help Vidalia resolve confusions related to bug 375. svn:r9484
2006-12-29 r11736@Kushana: nickm | 2006-12-28 17:46:23 -0500Nick Mathewson
Mark a pile of XXXX comments as targetted for 0.1.2: some because they look important, some because they look easy. svn:r9205
2006-12-13Infrastructure to test BEGIN_DIR cells.Roger Dingledine
New socks command CONNECT_DIR. New config option TunnelDirConns that builds a circ ending at the directory server and delivers a BEGIN_DIR cell if it's running 0.1.2.2-alpha or later. We still need to make one-hop circs when appropriate, while making other conns avoid them. svn:r9098
2006-10-29general cleanups from looking through or-cvsRoger Dingledine
svn:r8855
2006-10-20 r9307@Kushana: nickm | 2006-10-20 13:53:54 -0400Nick Mathewson
Have connection_about_to_close use an end_reason field in edge_connection_t to tell what reason to tell the controller for closing the stream. Set end_reason in connection_edge_end, connection_mark_unattached_ap, and everwhere we set edge_has_sent_end. Add a changelog entry. svn:r8779
2006-10-20 r9306@Kushana: nickm | 2006-10-20 13:27:43 -0400Nick Mathewson
Enable reasons for stream events in all cases but CLOSED in about_to_close_connection. That one will take a little longer. svn:r8778
2006-10-20 r9298@dhcp-18-188-67-85: nickm | 2006-10-20 11:25:07 -0400Nick Mathewson
Weasel correctly notes that we should not discard the return value from connection_exit_begin_con. Right now, the return value is always discardable, so this does not actually cause a bug, but it might later. So fix it. svn:r8774
2006-10-20 r9289@31-35-219: nickm | 2006-10-20 09:43:22 -0400Nick Mathewson
Fix longstanding bug in connection_exit_begin_conn(): Since connection_edge_end() exits when the connection is unattached, we were never sending RELAY_END cells back for failed RELAY_BEGIN attempts. Fix this. This might make clients that were otherwise timing out either fail faster or retry faster, which is good news for us. svn:r8770
2006-10-15clean up and downgrade some log messagesRoger Dingledine
svn:r8727
2006-10-13 r9017@totoro: nickm | 2006-10-13 01:27:33 -0400Nick Mathewson
Second patch to work on circuit close reasons from Mike Perry. Disabled partially; see comment. Whitespace cleaned up. svn:r8699
2006-10-07more minor cleanupsRoger Dingledine
svn:r8630
2006-10-01if we fail to build a circuit to an intended enclave, and it'sRoger Dingledine
not mandatory that we use that enclave, stop wanting it. svn:r8559
2006-09-29 r9032@Kushana: nickm | 2006-09-29 18:51:42 -0400Nick Mathewson
Now, all log messages should be distinct. svn:r8545
2006-09-29 r8997@Kushana: nickm | 2006-09-28 23:40:22 -0400Nick Mathewson
[Needs review.] Add a BEGIN_DIR relay cell type for an easier in-protocol way to connect to directory servers through Tor. Previously, clients could only connect to director servers over Tor from exit nodes, but couldn't get directory information anonymously from a non-exit cache without getting a directory server involved. This needs testing, and needs client-side code to actually exercise it. svn:r8527
2006-09-22 r8895@Kushana: nickm | 2006-09-21 20:05:11 -0400Nick Mathewson
Debug client-side reverse dns code. svn:r8452
2006-09-22remove some loud log messagesRoger Dingledine
svn:r8450
2006-09-07prefer calling it a client rather than an OPRoger Dingledine
svn:r8334
2006-08-10 r7299@Kushana: nickm | 2006-08-10 01:08:58 -0700Nick Mathewson
Patch from Tup to add support for transparent AP connections: this basically bundles the functionality of trans-proxy-tor into the tor mainline. Now hosts with compliant pf/netfilter implementations can redirect TCP connections straight to Tor without diverting through SOCKS. svn:r7007
2006-07-27 r6922@Kushana: nickm | 2006-07-26 16:32:24 -0400Nick Mathewson
Rename some fields, compress a bitfield, and document some structs and fields svn:r6919
2006-07-26 r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400Nick Mathewson
Clean up wide lines from last patch. svn:r6907
2006-07-26 r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400Nick Mathewson
Refactor connection_t into edge, or, dir, control, and base subtypes. This might save some RAM on busy exit servers, but really matters most in terms of correctness. svn:r6906
2006-07-23Don't tell anybody, but we're going OO here. This patch splitsNick Mathewson
circuit_t into origin_circuit_t and or_circuit_t. I fixed some segaults; there may be more. We still need to move more rendezvous stuff into subtypes. This is a trial run for splitting up connection_t; if the approach is insane, please say so soon so we can do something smarter. Also, this discards the old HALF_OPEN code, which nobody seems to want. svn:r6817
2006-07-18If we are using an exit enclave and we can't connect, e.g. becauseRoger Dingledine
its webserver is misconfigured to not listen on localhost, then back off and try connecting from somewhere else before we fail. svn:r6783
2006-07-04minor fixesRoger Dingledine
svn:r6709
2006-06-04Add a new warning to our "warn a lot" list: unused parameters. This means ↵Nick Mathewson
we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.) svn:r6532
2006-02-13the last of the log convention conversion. finally.Roger Dingledine
svn:r6005
2006-02-09Happy new year!Roger Dingledine
svn:r5949
2006-01-07Jan 05 19:39:27.356 [warn] connection_edge_process_end_not_open():Roger Dingledine
Got an end because of misc error, but we're not an AP. Closing. svn:r5744
2006-01-05Add reasons to DESTROY and RELAY_TRUNCATED cells.Nick Mathewson
svn:r5734
2005-12-31Some tor servers process billions of cells in a matter of days.Roger Dingledine
These statistics need to be uint64_t's. svn:r5686
2005-12-19when we fail three times to resolve or connect, we were telling theRoger Dingledine
user it was because we failed to resolve. svn:r5620
2005-12-14Choose directory servers from routerstatus list, not from routerinfo list. ↵Nick Mathewson
This way, as soon was we have a networkstatus, we can ask a cache to give us routers, rather than needing to ask the directories. svn:r5586
2005-12-14Bite the bullet and limit all our source lines to 80 characters, the way IBM ↵Nick Mathewson
intended. svn:r5582
2005-12-10when we changed from log_fn to debug/info/notice/warn/err,Roger Dingledine
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-10crank the max line limit down to 150 chars.Roger Dingledine
svn:r5550
2005-11-30Rename connection_get_by_identity_digest to reflect that it is OR-only. ↵Nick Mathewson
Make it use a hashtable instead of a linear search. svn:r5469
2005-11-17we used to kill the circuit when we receive a relay command weRoger Dingledine
don't recognize. now we just drop it. perhaps this will make us more forward-compatible? or perhaps it will bite us? one day we will find out. svn:r5405
2005-11-15another case where the poor server operator doesn't need toRoger Dingledine
hear about lexi's bugs. svn:r5388
2005-10-25Remove last vestiges of old logging interface.Nick Mathewson
svn:r5317