aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
Commit message (Collapse)AuthorAge
...
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-01-03
|\|
| * Fix spelling in a controlsocket log msgSebastian Hahn2011-12-30
| | | | | | | | Fixes bug 4803.
* | Fix a check-spaces violation in compat.cSebastian Hahn2011-12-30
| | | | | | | | Also fix a comment typo
* | Merge remote-tracking branch 'public/bug4697'Nick Mathewson2011-12-22
|\ \
| * | Ignore all bufferevent events on a marked connectionNick Mathewson2011-12-17
| | | | | | | | | | | | Bug 4697; fix on 0.2.3.1-alpha
* | | Convert a couple of char[256]s into sockaddr_storageNick Mathewson2011-12-21
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-12-21
|\ \ \ | |/ / |/| / | |/
| * Do not even try to keep going on a socket with socklen==0Nick Mathewson2011-12-21
| | | | | | | | | | | | | | | | | | | | Back in #1240, r1eo linked to information about how this could happen with older Linux kernels in response to nmap. Bugs #4545 and #4547 are about how our approach to trying to deal with this condition was broken and stupid. Thanks to wanoskarnet for reminding us about #1240. This is a fix for the abovementioned bugs, and is a bugfix on 0.1.0.3-rc.
* | Resolve bug 3448: remove mention of tor-ops (which is not in use)Nick Mathewson2011-12-02
| |
* | Use correct address family where necessary for bridges on IPv6.Linus Nordberg2011-11-30
| |
* | Add some logging and comments.Linus Nordberg2011-11-30
| |
* | Initial hacking for proposal 186.Nick Mathewson2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
* | Fix some DOCDOCsNick Mathewson2011-11-29
| |
* | New 'DisableNetwork' option to prevent Tor from using the networkNick Mathewson2011-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers want this so they can mess with Tor's configuration for a while via the control port before actually letting Tor out of the house. We do this with a new DisableNetwork option, that prevents Tor from making any outbound connections or binding any non-control listeners. Additionally, it shuts down the same functionality as shuts down when we are hibernating, plus the code that launches directory downloads. To make sure I didn't miss anything, I added a clause straight to connection_connect, so that we won't even try to open an outbound socket when the network is disabled. In my testing, I made this an assert, but since I probably missed something, I've turned it into a BUG warning for testing.
* | Fix compile warnings on windowsSebastian Hahn2011-11-15
| |
* | Fix memory leak in retry_all_listeners: Coverity CID 485Nick Mathewson2011-10-26
| |
* | Fix names of functions that convert strings to addrsNick Mathewson2011-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now let's have "lookup" indicate that there can be a hostname resolution, and "parse" indicate that there wasn't. Previously, we had one "lookup" function that did resolution; four "parse" functions, half of which did resolution; and a "from_str()" function that didn't do resolution. That's confusing and error-prone! The code changes in this commit are exactly the result of this perl script, run under "perl -p -i.bak" : s/tor_addr_port_parse/tor_addr_port_lookup/g; s/parse_addr_port(?=[^_])/addr_port_lookup/g; s/tor_addr_from_str/tor_addr_parse/g; This patch leaves aton and pton alone: their naming convention and behavior is is determined by the sockets API. More renaming may be needed.
* | Cell types and states for new OR handshakeNick Mathewson2011-10-10
| | | | | | | | | | | | Also, define all commands > 128 as variable-length when using v3 or later link protocol. Running into a var cell with an unrecognized type is no longer a bug.
* | Merge remote-tracking branch 'asn2/bug3656'Nick Mathewson2011-10-07
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/util.c src/common/util.h src/or/config.h src/or/main.c src/test/test_util.c
| * | Remove connection_uses_transport() since it was unused.George Kadianakis2011-09-11
| | |
| * | Reverting the accounting thing introduced in 5492de76 till I think how it ↵George Kadianakis2011-07-14
| | | | | | | | | | | | should be done properly.
| * | Put some last missing pieces together.George Kadianakis2011-07-13
| | | | | | | | | | | | | | | | | | | | | | | | * Add some utility transport functions in circuitbuild.[ch] so that we can use them from pt.c. * Make the accounting system consider traffic coming from proxies. * Make sure that we only fetch bridge descriptors when all the transports are configured.
* | | Fix issues in 3630 patch noted by KarstenNick Mathewson2011-09-22
| | |
* | | Make bufferevents work with TokenBucketRefillIntervalNick Mathewson2011-09-22
| | |
* | | Refactor connection_bucket_refill(_helper) to avoid roundoffNick Mathewson2011-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were doing "divide bandwidth by 1000, then multiply by msec", but that would lose accuracy: instead of getting your full bandwidth, you'd lose up to 999 bytes per sec. (Not a big deal, but every byte helps.) Instead, do the multiply first, then the division. This can easily overflow a 32-bit value, so make sure to do it as a 64-bit operation.
* | | New torrc option to allow bucket refill intervals of less than 1 secFlorian Tschorsch2011-09-22
| | | | | | | | | | | | Implements bug3630.
* | | Log errno on listener socket creation failure.Nick Mathewson2011-09-15
| | | | | | | | | | | | This may help diagnose bug 4027.
* | | Fix whitespace issues in patches merged today so farNick Mathewson2011-09-07
| | |
* | | chown() sockets when User option is setJérémy Bobbio2011-09-07
| | | | | | | | | | | | Fixes bug 3421
* | | Merge remote-tracking branch 'public/split_entry_conn'Nick Mathewson2011-09-07
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Move entry-only fields from edge_connection_t to entry_connection_tNick Mathewson2011-07-21
| | | | | | | | | | | | | | | | Also, refactor the code accordingly.
| * | | Add a new type entry_connection_t for entry connectionsNick Mathewson2011-07-21
| | | | | | | | | | | | | | | | No fields have moved there yet; for now, it's just a placeholder type.
* | | | Explicitly set bucket_cfg to NULL after we freed itSebastian Hahn2011-09-01
| | | | | | | | | | | | | | | | This should fix bug 3888.
* | | | Fix compilation on non-bufferevent systems after 3803 fix: oops.Nick Mathewson2011-08-29
| | | |
* | | | Split out rephist parts of buckets_decrementNick Mathewson2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For bufferevents, we had all of connection_buckets_decrement() stubbed out. But that's not actually right! The rephist_* parts were essential for, inter alia, recording our own bandwidth. This patch splits out the rephist parts of connection_buckets_decrement() into their own function, and makes the bufferevent code call that new function. Fixes bug 3803, and probably 3824 and 3826 too. Bugfix on 0.2.3.1-alpha.
* | | | Set write low-watermarks on all bufferevents.Nick Mathewson2011-08-24
| | | | | | | | | | | | | | | | | | | | If we don't do this, then we never invoke the bufferevent write callbacks until all the bufferevent's data is flushed.
* | | | Apply rate-limiting to the lowest bufferevent in the stack.Nick Mathewson2011-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're doing filtering ssl bufferevents, we want the rate-limits to apply to the lowest level of the bufferevent stack, so that we're actually limiting bytes sent on the network. Otherwise, we'll read from the network aggressively, and only limit stuff as we process it.
* | | | Appease "make check-spaces"Nick Mathewson2011-08-18
| | | |
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-08-17
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | Conflicts: src/or/config.c
| * | | Don't write ControlPorts to disk till after we setuid and make datadirNick Mathewson2011-08-17
| | | | | | | | | | | | | | | | Fix for bug 3747; bugfix on 0.2.2.26-beta.
* | | | Actually pick a random port when "auto" is specifiedSebastian Hahn2011-08-17
| | | | | | | | | | | | | | | | ddc65e2b3303559ab7b842a176ee6c2eda9e4027 had broken this
* | | | Free global_rate_limit in connection_free_all().George Kadianakis2011-08-13
| | | |
* | | | Move connection_free_all() to the bottom of connection.c to enjoy maximum ↵George Kadianakis2011-08-13
| | | | | | | | | | | | | | | | visibility.
* | | | Implement protocol-type isolation correctly.Nick Mathewson2011-08-02
| |/ / |/| | | | | | | | | | | | | | | | | | | | Previously we'd just looked at the connection type, but that's always CONN_TYPE_AP. Instead, we should be looking at the type of the listener that created the connection. Spotted by rransom; fixes bug 3636.
* | | Don't assert for listener connectionsSebastian Hahn2011-07-20
| | |
* | | Initialize listener connection addr fields properlyNick Mathewson2011-07-20
| | |
* | | Add a missing break in a switch statementNick Mathewson2011-07-20
| | |
* | | Merge branch 'optimistic-client'Nick Mathewson2011-07-20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conflicts are with the proposal 171 circuit isolation code, and they're all trivial: they're just a matter of both branches adding some unrelated code in the same places. Conflicts: src/or/circuituse.c src/or/connection.c
| * | | Remember optimistically sent data until we have gotten a CONNECTEDNick Mathewson2011-07-18
| | | | | | | | | | | | | | | | | | | | Since we can retry failed streams under some circumstances, we need to be ready to send data queued on them.
* | | | Use socks username/password information in stream isolationNick Mathewson2011-07-19
| | | |