aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-08-09Sticking a size_t into long generates a warn on winSebastian Hahn
2011-08-09Get rid of an unused parameter warning on winSebastian Hahn
2011-08-09Sockets are unsigned on windowsSebastian Hahn
this gets rid of a warning about signed/unsigned comparison
2011-08-08Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-08-08Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
2011-08-08Update to the August 2011 GeoIP database.Karsten Loesing
2011-08-08Merge remote-tracking branch 'public/bug3550'Nick Mathewson
2011-08-08Remove connection_edge_streams_are_compatibleRobert Ransom
It's dead code (not used anywhere by the current proposal 171 algorithm).
2011-08-08Fix handling of ISO_STREAMRobert Ransom
Now we track *which* stream with ISO_STREAM set is associated to a particular circuit, so that we won't think that stream is incompatible with its circuit and launch another one a second later, and we use that same field to mark circuits which have had an ISO_STREAM stream attached to them, so that we won't ever put a second stream on that circuit. Fixes bug 3695.
2011-08-06Fix log message typoRobert Ransom
2011-08-05Merge remote-tracking branch 'public/bug3683'Nick Mathewson
2011-08-05Clear socks auth fields before freeNick Mathewson
2011-08-05Handle storing much longer socks4 authentication data.Nick Mathewson
2011-08-04Clean up bridge-stats code.Karsten Loesing
Only write a bridge-stats string if bridge stats have been initialized. This behavior is similar to dirreq-stats, entry-stats, etc. Also add a few unit tests for the bridge-stats code.
2011-08-04Separate generation of an entry-stats string from writing it to disk.Karsten Loesing
This commit is similar to the previous two commits for dirreq-stats, but for entry-stats.
2011-08-04Separate generation of a dirreq-stats string from writing it to disk.Karsten Loesing
This patch separates the generation of a dirreq-stats string from actually writing it to disk. The new geoip_format_dirreq_stats() generates a dirreq-stats string that geoip_dirreq_stats_write() writes to disk. All the state changing (e.g., resetting the dirreq-stats history and initializing the next measurement interval) takes place in geoip_dirreq_stats_write(). That allows us to finally test the dirreq-stats code better.
2011-08-04Clean up geoip_dirreq_stats_write().Karsten Loesing
We later want to split this function into one function that generates the dirreq-stats string and one that writes it to disk.
2011-08-04Add unit tests for buffer-stats.Karsten Loesing
Now that formatting the buffer-stats string is separate from writing it to disk, we can also decouple the logic to extract stats from circuits and finally write some unit tests for the history code.
2011-08-04Separate generation of a buffer-stats string from writing it to disk.Karsten Loesing
The new rep_hist_format_buffer_stats() generates a buffer-stats string that rep_hist_buffer_stats_write() writes to disk. All the state changing (e.g., resetting the buffer-stats history and initializing the next measurement interval) takes place in rep_hist_buffer_stats_write(). That allows us to finally test the buffer-stats code better.
2011-08-04Clean up rep_hist_buffer_stats_write().Karsten Loesing
We later want to split this function into one function that generates the buffer-stats string and one that writes it to disk.
2011-08-04Create cell-stats history even if we didn't see a single circuit.Karsten Loesing
So far, if we didn't see a single circuit, we refrained from generating a cell-stats string and logged a warning. Nobody will notice the warning, and people will wonder why there's no cell-stats string in the extra-info descriptor. The better behavior is to generate a cell-stats string with all zeros.
2011-08-04Replace files in stats/ rather than appending to them.Karsten Loesing
Right now, we append statistics to files in the stats/ directory for half of the statistics, whereas we overwrite these files for the other half. In particular, we append buffer, dirreq, and entry stats and overwrite exit, connection, and bridge stats. Appending to files was useful when we didn't include stats in extra-info descriptors, because otherwise we'd have to copy them away to prevent Tor from overwriting them. But now that we include statistics in extra-info descriptors, it makes no sense to keep the old statistics forever. We should change the behavior to overwriting instead of appending for all statistics. Implements #2930.
2011-08-04Make --quiet and --hush apply to default logs, not only initial logsNick Mathewson
Fixes bug 3550; bugfix on 0.2.0.10-alpha (where --quiet was introduced).
2011-08-04Treat socks_request->{username,password} as non-NUL-terminatedNick Mathewson
They *are* non-NUL-terminated, after all (and they have to be, since the SOCKS5 spec allows them to contain embedded NULs. But the code to implement proposal 171 was copying them with tor_strdup and comparing them with strcmp_opt. Fix for bug on 3683; bug not present in any yet-released version.
2011-08-02Implement protocol-type isolation correctly.Nick Mathewson
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.
2011-08-01Initial patch to build Tor with msvc and nmakeNick Mathewson
We'll still need to tweak it so that it looks for includes and libraries somewhere more sensible than "where we happened to find them on Erinn's system"; so that tests and tools get built too; so that it's a bit documented; and so that we actually try running the output. Work done with Erinn Clark.
2011-08-01Re-order tor_fw_helper_LDADD flags so that they workNick Mathewson
Patch from "blueness".
2011-07-21Improve log messages for optimistic data retryIan Goldberg
2011-07-21remember our future plan for bug 3617Roger Dingledine
(that is, to change the default for "UseOptimisticData auto" to 1 once we are more convinced that it works correctly.)
2011-07-20Add another precondition for isolation-clearing; fix 3620Nick Mathewson
2011-07-20Do not cannibalize a circuit with isolation values set.Nick Mathewson
2011-07-20For accuracy, s/exit_allows_optimistic_data/may_use_optimistic_data/Nick Mathewson
2011-07-20Add an OptimisticData option to control client-side optimistic dataNick Mathewson
2011-07-20Don't assert for listener connectionsSebastian Hahn
2011-07-20Check for port config before addr config in client port optionsNick Mathewson
Otherwise, we'll fail, since "9050" looks like a perfectly fine address.
2011-07-20Oops: we need to call parse_client_ports with validate_only==0 at least onceNick Mathewson
2011-07-20Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-07-20Check return value in fmt_addrNick Mathewson
Previously, if tor_addr_to_str() returned NULL, we would reuse the last value returned by fmt_addr(). (This could happen if we were erroneously asked to format an AF_UNSPEC address.) Now instead we return "???".
2011-07-20Fix a warning message. (Found by rransom)Nick Mathewson
2011-07-20Initialize listener connection addr fields properlyNick Mathewson
2011-07-20Add a missing break in a switch statementNick Mathewson
2011-07-20Merge branch 'optimistic-client'Nick Mathewson
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
2011-07-20Unit test for generic_buffer_set_to_copyNick Mathewson
2011-07-19Merge remote-tracking branch 'public/prop171_v2'Nick Mathewson
2011-07-19Fix spurious warning in bufferevent socks parsingNick Mathewson
The problem was that we weren't initializing want_length to 0 before calling parse_socks() the first time, so it looked like we were risking an infinite loop when in fact we were safe. Fixes 3615; bugfix on 0.2.3.2-alpha.
2011-07-19Fix a compile warning in config.c reported by sebastianNick Mathewson
2011-07-19Take a smarter approach to clearing isolation infoNick Mathewson
Back when I added this logic in 20c0581a79, the rule was that whenever a circuit finished building, we cleared its isolation info. I did that so that we would still use the circuit even if all the streams that had previously led us to tentatively set its isolation info had closed. But there were problems with that approach: We could pretty easily get into a case where S1 had led us to launch C1 and S2 had led us to launch C2, but when C1 finished, we cleared its isolation and attached S2 first. Since C2 was still marked in a way that made S1 unattachable to it, we'd then launch another circuit needlessly. So instead, we try the following approach now: when a circuit is done building, we try to attach streams to it. If it remains unused after we try attaching streams, then we clear its isolation info, and try again to attach streams. Thanks to Sebastian for helping me figure this out.
2011-07-19Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-07-19Specify text or binary mode in every start_writing_to_stdio_file callRobert Ransom
2011-07-19Use socks username/password information in stream isolationNick Mathewson