summaryrefslogtreecommitdiff
path: root/src/or/channel.c
AgeCommit message (Collapse)Author
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Wrap all of the legacy guard code, and its users, in #ifdefsNick Mathewson
This will make it easier to see what we remove down the line.
2016-12-08Teach channel_rsa_id_group_set_badness_() about Ed25519Nick Mathewson
(Only run the connection_or_group_set_badness_() function on groups of channels that have the same RSA and Ed25519 identities.) There's a possible opportunity here where we might want to set a channel to "bad" if it has no ed25519 identity and some other channel has some. Also there's an opportunity to add a warning if we ever have an Ed mismatch on open connections with the same RSA ID.
2016-12-08Tell channel_set_identity_digest() that ed keys can be NULLNick Mathewson
2016-12-08Propagate Ed25519 identities downwards into more functions.Nick Mathewson
Actually set ed25519 identities on channels when we set a channel's identity.
2016-12-08Migrate main data loop for set_bad_connections to use channel structuresNick Mathewson
This was the last user of our or_connections-by-ID map. It also had a tendency to be O(N) in cases that only had to be O(1).
2016-12-08When attempting to find a channel by ID, consider Ed ID.Nick Mathewson
Right now, there's only a mechanism to look for a channel where the RSA ID matches *and* the ED ID matches. We can add a separate map later if we want.
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
2016-11-03Replace some assert(1)s with nonfatal_unreached_once().Nick Mathewson
These were probably supposed to be assert(0).
2016-11-03Merge branch 'feature_15055_v2'Nick Mathewson
2016-11-03Add "Ed ID" arguments to a bunch of connection-ID-related fns.Nick Mathewson
In particular, these functions are the ones that set the identity of a given connection or channel, and/or confirm that we have learned said IDs. There's a lot of stub code here: we don't actually need to use the new keys till we start looking up connections/channels by Ed25519 IDs. Still, we want to start passing the Ed25519 IDs in now, so it makes sense to add these stubs as part of 15055.
2016-10-19Unify code in channel_write_*cell()Nick Mathewson
Patch from pingl; patch for 13827.
2016-10-18Module docs for channel.c and channeltls.cNick Mathewson
2016-09-06checkSpace.pl now forbids more identifiers.Nick Mathewson
The functions it warns about are: assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc, strdup, strndup, calloc. Also, fix a few lingering instances of these in the code. Use other conventions to indicate _intended_ use of assert and malloc/realloc/etc.
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
2016-06-11Add the -Wextra-semi warning from clang, and fix the cases where it triggersNick Mathewson
2016-06-11Use -Wdouble-promotion in GCC >= 4.6Nick Mathewson
This warning triggers on silently promoting a float to a double. In our code, it's just a sign that somebody used a float by mistake, since we always prefer double.
2016-06-11Add -Wfloat-conversion for GCC >= 4.9Nick Mathewson
This caught quite a few minor issues in our unit tests and elsewhere in our code.
2016-03-28Rename tor_dup_addr to tor_addr_to_str_dup.Nick Mathewson
Patch from icanhasaccount; closes 18462.
2016-03-26Do not treat "DOCDOC" as doxygen.Nick Mathewson
2016-03-21Merge branch 'bug18570_027'Nick Mathewson
2016-03-21Make sure channel_t queues its own copy of incoming cellsAndrea Shepard
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-09-01properly delete current channel in channel_free_listSebastian Hahn
channel_unregister() removes channels from the current smartlist while we're in a SMORTLIST_FOREACH loop. This only works by accident.
2015-05-28Tests for AUTHENTICATE cell functionality.Nick Mathewson
2015-01-07When closing circs build through a new guard, only close local onesNick Mathewson
If we decide not to use a new guard because we want to retry older guards, only close the locally-originating circuits passing through that guard. Previously we would close all the circuits. Fixes bug 9819; bugfix on 0.2.1.1-alpha. Reported by "skruffy".
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-22Fix a bunch of memory leaks in the unit tests. Found with valgrindNick Mathewson
2014-12-21Merge branch 'ticket7356_squashed'Nick Mathewson
2014-12-21Use channel state lookup macros in channel.crl1987
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-30Make channel_flush_some_cells() mockableAndrea Shepard
2014-09-30Make channel_dump_statistics() mockableAndrea Shepard
2014-09-30What the hell was I on?Andrea Shepard
2014-09-30Let channel unit tests mess with global queue estimateAndrea Shepard
2014-09-30Expose some channel cell queue stuff to the test suiteAndrea Shepard
2014-09-30Refactor channel_get_cell_queue_entry_size() to avoid an unreachable line ↵Andrea Shepard
for test coverage, and fix a nasty lurking memory bug in channel_flush_some_cells_from_outgoing_queue()
2014-09-30Eliminate some unnecessary smartlists in scheduler.cAndrea Shepard
2014-09-30Schedule according to a queue size heuristicAndrea Shepard
2014-09-30Fix return values from channel_flush_some_cells() to correctly count cells ↵Andrea Shepard
directly written by channel_flush_from_first_active_circuit()
2014-09-30Implement global queue size query in channel.cAndrea Shepard
2014-09-30Track total queue size per channel, with overhead estimates, and global ↵Andrea Shepard
queue total
2014-09-30Add global cell/byte counters and per channel byte counters to channel.cAndrea Shepard
2014-09-30Provide generic mechanism for scheduler to query writeable cells on a channelAndrea Shepard
2014-09-30Implement scheduler mechanism to track lists of channels wanting cells or ↵Andrea Shepard
writes; doesn't actually drive the cell flow from it yet
2014-09-09Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-09-05Correctly update channel local mark when address of incoming connection ↵Andrea Shepard
changes after handshake; fixes bug #12160