cypherpunks
fd3e0c1542
core/mainloop: Limit growth of conn->inbuf
...
If the buf_t's length could potentially become greater than INT_MAX - 1,
it sets off an IF_BUG_ONCE in buf_read_from_tls().
All of the rest of the buffers.c code has similar BUG/asserts for this
invariant.
2020-03-24 05:19:24 +00:00
teor
81687f5bc9
relay: Split out relay-only circuit building
...
Move the relay-only circuit building functions into a new file.
Part of 33633.
2020-03-20 18:05:10 +10:00
teor
fdba6ff0c0
relay: Move inform_testing_rechability() to relay
...
Move inform_testing_rechability() to the relay module, and disable it
when the relay module is disabled.
Part of 33633.
2020-03-20 18:05:10 +10:00
Neel Chauhan
52b4b7e492
Fix erroneous spaces in circuitmux_ewma.c
2020-03-19 13:18:26 -07:00
teor
fe5ecaa270
Merge branch 'maint-0.4.3'
2020-03-19 17:02:02 +10:00
teor
259fad5877
Merge remote-tracking branch 'tor-github/pr/1806' into maint-0.4.3
2020-03-19 16:56:49 +10:00
Nick Mathewson
d4595b344a
Merge branch 'maint-0.4.3'
2020-03-17 13:56:10 -04:00
Nick Mathewson
6803373aab
Merge branch 'maint-0.4.2' into maint-0.4.3
2020-03-17 13:56:10 -04:00
Nick Mathewson
4ee2699416
Merge branch 'maint-0.4.1' into maint-0.4.2
2020-03-17 13:56:10 -04:00
David Goulet
ee3e987898
sendme: Emit version 1 by default
...
Closes #33623
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-03-17 10:14:57 -04:00
teor
44f92e8e42
Merge remote-tracking branch 'tor-github/pr/1784'
2020-03-17 23:11:31 +10:00
Nick Mathewson
78bcfc1280
circpad_setup_machine_on_circ(): exit early on error.
...
This function does a nonfatal assertion to make sure that a machine
is not registered twice, but Tobias Pulls found a case where it
happens. Instead, make the function exit early so that it doesn't
cause a remotely triggered memory leak.
Fixes bug 33619; bugfix on 0.4.0.1-alpha. This is also tracked as
TROVE-2020-004.
2020-03-16 17:59:57 -04:00
teor
cc2fb91ea5
connection: Stop forcing some ports to prefer IPv6
...
Stop forcing all non-SOCKSPorts to prefer IPv6 exit connections.
Instead, prefer IPv6 connections by default, but allow users to change
their configs using the "NoPreferIPv6" port flag.
Fixes bug 33608; bugfix on 0.4.3.1-alpha.
2020-03-13 12:28:19 +10:00
David Goulet
894ff2dc84
dos: Pass transport name on new client connection
...
For a bridge configured with a pluggable transport, the transport name is
used, with the IP address, for the GeoIP client cache entry.
However, the DoS subsystem was not aware of it and always passing NULL when
doing a lookup into the GeoIP cache.
This resulted in bridges with a PT are never able to apply DoS defenses for
newly created connections.
Fixes #33491
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-03-10 14:45:13 -04:00
David Goulet
6684c6e17f
Merge branch 'tor-github/pr/1751'
2020-03-09 09:33:05 -04:00
Neel Chauhan
7d673e70b0
Remove the ClientAutoIPv6ORPort option
2020-03-09 09:33:00 -04:00
Nick Mathewson
ba8d71d9c3
Merge remote-tracking branch 'tor-github/pr/1774/head'
2020-03-05 09:10:24 -05:00
Nick Mathewson
686494f0f7
Merge branch 'clang_format_prep_3'
2020-03-05 08:23:32 -05:00
Roger Dingledine
29542ccdcc
Remove surprising empty line in info-level cbt log
...
Fixes bug 33531; bugfix on 0.3.3.1-alpha.
2020-03-04 13:45:34 -05:00
Nick Mathewson
11adf0f46f
Merge remote-tracking branch 'tor-github/pr/1750/head'
2020-02-25 12:58:23 -05:00
Nick Mathewson
d4d5d9d1d1
Merge branch 'ticket33316_squashed'
2020-02-24 07:49:45 -05:00
Nick Mathewson
63b7dabdea
Merge ocirc and orconn events into or subsystem.
...
Pubsub events are not supposed to have their own subsystems; they're
supposed to be part of a parent subsystem.
2020-02-24 07:49:39 -05:00
Nick Mathewson
caa392a73a
Merge remote-tracking branch 'tor-github/pr/1685/head'
2020-02-24 07:45:20 -05:00
Nick Mathewson
66bbdadbbe
Merge branch 'extract_routerkeys_squashed'
2020-02-20 10:41:12 -05:00
Nick Mathewson
1d068625dd
Move relay_handshake.[ch] into src/feature/relay, and make it optional
2020-02-20 10:41:06 -05:00
Nick Mathewson
e425ffc637
Disable routerkeys.c with --disable-relay-mode.
2020-02-20 10:41:06 -05:00
Nick Mathewson
09fb7987c5
Merge branch 'maint-0.4.3'
2020-02-20 08:50:18 -05:00
Nick Mathewson
f733b8acd6
Merge remote-tracking branch 'tor-github/pr/1719/head' into maint-0.4.3
2020-02-20 08:48:17 -05:00
Nick Mathewson
dd4fa9b468
Extract relay-only handshake code into its own file.
...
This is not the only relay-only handshake code, but it is most of
such code that is in connection_or.c.
2020-02-19 19:11:57 -05:00
Nick Mathewson
a65efa7e83
Merge branch 'extract_relay_dns'
2020-02-19 13:58:53 -05:00
Nick Mathewson
65b75ef3d5
Merge branch 'extract_ext_orport'
2020-02-19 13:55:18 -05:00
Nick Mathewson
f739aa7962
Remove assert_all_pending_dns_resolves_ok().
...
It hasn't been used since 2009.
2020-02-19 12:27:49 -05:00
Steven Engler
9a68eca3a7
Small changes to scheduler comments and state changes
...
Tries to make some of the comments in scheduler.c easier to follow,
and simplifies a couple of the scheduler channel state changes.
2020-02-18 13:56:58 -05:00
Nick Mathewson
1f958b6020
Move ext_orport identifier map into ext_orport.c
...
There's no need to move the declarations: those were already in
ext_orport.h.
This shrinks connection_or.c a little.
2020-02-18 13:10:57 -05:00
Nick Mathewson
8ce15933e5
Move some declarations into proto_ext_or.h
...
They are for functions declared in that file.
2020-02-18 13:07:33 -05:00
Nick Mathewson
1f06f494c8
Move DNS TTL manipulation code to src/core/or
...
This removes a dependency from the client code on feature/relay.
2020-02-18 12:08:29 -05:00
Nick Mathewson
dcbc45e6b2
Replace identifiers related to clipping DNS ttls.
...
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
MIN_DNS_TTL_AT_EXIT MIN_DNS_TTL \
MAX_DNS_TTL_AT_EXIT MAX_DNS_TTL \
dns_clip_ttl clip_dns_ttl
2020-02-18 12:00:24 -05:00
Nick Mathewson
93af83e16a
Remember dirctory bw usage, and log it in the heartbeat
...
Closes ticket 32720.
2020-02-18 11:25:18 -05:00
Nick Mathewson
a6509cb867
Merge remote-tracking branch 'tor-github/pr/1727/head'
2020-02-14 08:20:21 -05:00
Nick Mathewson
a010dbf94c
Merge branch 'maint-0.4.3'
2020-02-14 08:17:16 -05:00
Nick Mathewson
a79841fd83
Merge branch 'ticket33290_v2_042' into maint-0.4.3
2020-02-14 08:16:22 -05:00
Nick Mathewson
393bbd823e
Merge branch 'ticket33290_v2_041' into ticket33290_v2_042
2020-02-14 08:16:01 -05:00
Nick Mathewson
c1649ab015
Wipe the entire hashent structure, not just the first sizeof(void*)
2020-02-14 08:15:37 -05:00
teor
98899f20ad
mainloop: Explain local connections better
...
Some connections aren't counted for statistics or accounting,
because they have been specifically configured by the user to
local addresses.
Comment-only change.
Closes 33201.
2020-02-14 10:13:00 +10:00
Nick Mathewson
67d59d7d1f
Re-order most subsystems to correspond to dependency order.
2020-02-13 12:53:15 -05:00
Nick Mathewson
1ab7c05231
Merge branch 'maint-0.4.3'
2020-02-13 10:47:43 -05:00
Nick Mathewson
baeff46d36
Merge branch 'ticket33290_v2_042' into ticket33290_v2_043
...
Conflicts:
src/core/or/circuitmux_ewma.c
2020-02-13 09:21:47 -05:00
Nick Mathewson
fd1686c7d8
Merge branch 'ticket33290_v2_041' into ticket33290_v2_042
2020-02-13 09:12:48 -05:00
Nick Mathewson
fff1054d17
Before freeing ewma objects, use memwipe instead of resetting magic.
2020-02-13 09:11:35 -05:00
Nick Mathewson
80e3dc4727
Use more memory poisoning and better asserts around ewma code
...
Attempt to diagnose 32464; fixes 33290.
2020-02-12 14:17:19 -05:00