aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay
AgeCommit message (Collapse)Author
2020-10-07Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2020-07-22Treat all extorport connections with un-set addresses as remoteNick Mathewson
Without this fix, if an PT forgets to send a USERADDR command, that results in a connection getting treated as local for the purposes of rate-limiting. If the PT _does_ use USERADDR, we still believe it. Closes ticket 33747.
2020-06-29Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3Nick Mathewson
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.3 version.)
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
2020-05-06Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-05-06Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-05-06Merge branch 'bug34078_prelim_035' into bug34078_prelim_041Nick Mathewson
2020-05-06Replace some "fall through" comments not at the end of a case.Nick Mathewson
2020-03-21Merge branch 'bug32588_042' into bug32588_043teor
Merge static function declaration deletions from bug32588_042 and maint-0.4.3 in app/config/config.c.
2020-03-21Merge branch 'bug32588_041' into bug32588_042teor
2020-03-21Merge branch 'bug32588_035' into bug32588_041teor
Merge tests from maint-0.4.1 with new tests from bug32588_035 in test_router.c.
2020-03-21router: Refactor IPv6 ORPort function logicteor
Return early when there is no suitable IPv6 ORPort. Show the address and port on error, using a convenience function. Code simplification and refactoring. Cleanup after 32588.
2020-03-21router: Stop advertising incorrect auto IPv6 ORPortsteor
When IPv6 ORPorts are set to "auto", tor relays and bridges would advertise an incorrect port in their descriptor. This may be a low-severity memory safety issue, because the published port number may be derived from uninitialised or out-of-bounds memory reads. Fixes bug 32588; bugfix on 0.2.3.9-alpha.
2020-03-20relay/dirauth: Set some output arguments in stubsteor
And document how some functions set their output arguments. Fixes bug 33674; bugfix on 0.4.3.1-alpha.
2020-03-20Set *have_low_ports_out from stub port_parse_ports_relay().Nick Mathewson
Previously we just ignored this option, which would leave it unset, and cause an assertion failure later on when running with the User option. Fixes bug 33668; bugfix on 0.4.3.1-alpha.
2020-03-12Merge branch 'ticket33361_035_01_squashed' into maint-0.4.3Nick Mathewson
Conflicts: src/app/config/config.c
2020-02-12Merge branch 'maint-0.4.1' into maint-0.4.2teor
2020-02-12Merge branch 'maint-0.3.5' into maint-0.4.1teor
2020-02-12Lowercase the BridgeDistribution value from torrc in descriptors.Alexander Færøy
This patch ensures that we always lowercase the BridgeDistribution from torrc in descriptors before submitting it. See: https://bugs.torproject.org/32753
2020-01-20Merge branch 'tor-github/pr/1668'David Goulet
2020-01-15Don't escape the bridge distribution value.Alexander Færøy
We already check if there are invalid values in check_bridge_distribution_setting() and reject the value if that is the case. We can therefore only have strings of [A-Z] | [a-z] | [0-9] | '-' | '_' here which is according to the directory specification. See: https://bugs.torproject.org/32753
2020-01-16add_c_file: Fix "control line not preceded by a blank line"teor
Fix dirauth and relay module include.am add_c_file.py "control line not preceded by a blank line" errors. Also remove a duplicate ADD_C_FILE: SOURCES in the relay module. Obviously correct fixes to already-reviewed code.
2020-01-15Remove "hyphae" as a known value for BridgeDistribution.Alexander Færøy
This patch removes hyphae as a known value for the BridgeDistribution option in torrc.
2020-01-15Lowercase BridgeDistribution value before adding it to the descriptor.Alexander Færøy
This patch makes sure we lowercase the value of BridgeDistribution before we add it to the descriptor as `bridge-distribution-request`. See: https://bugs.torproject.org/32753
2020-01-15Make BridgeDistribution setting validator case-insensitive.Alexander Færøy
This patch makes sure that we accept values such as "nOne", "None", and "AnY" as valid values for BridgeDistribution. We later ensure to lower-case the values before they are forwarded to the BridgeDB. See: https://bugs.torproject.org/32753
2020-01-15Always escape BridgeDistribution value from torrc in descriptors.Alexander Færøy
When the BridgeDistribution value was added in commit ebab5215252f9fa810ae091c335c5ae6e619faaf the check for whether the value contains '\n' or '\r' was added as a requirement for whether or not the value should be escaped. This patch removes this check and makes sure we call `escaped()` on the value every time before we add it to a descriptor. See: https://bugs.torproject.org/32753
2020-01-13Split core/include.am into per-subdirectory include.am filesNick Mathewson
Closes ticket 32137.
2020-01-09Merge branch 'ticket22029_attempt_squashed'Nick Mathewson
2020-01-09Allow ed25519 keys to be banned in approved-routersNeel Chauhan
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Include ht.h in all headers that use HT_ENTRY()Nick Mathewson
Without this change, compilation success depends on include order in several tricky ways.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-08router: Improve port search function commentsteor
2019-12-20Code Style: Delete PRIVATE defines that are never usedteor
Some ".c" files define *_PRIVATE macros, but those macros are not used in any header file. Delete them. These changes were created using the "make autostyle" from 32522, and then split into commits.
2019-12-19Declare relay/dirauth subsystem levels in a header.Nick Mathewson
This way, we can't get out of sync between the two declarations.
2019-12-19Add "stub" files for disabled modules.Nick Mathewson
These modules are only built when the selected modules are disabled. The provide stub implementations of the subsystem blocks. Later, other stub implementations could move here. Having real subsystem blocks here will let us handle disabled configuration options better.
2019-12-04practracker: Add missing .may_include filesteor
All of these files contain "*.h", except for: * src/app/config/.may_include * src/test/.may_include which also contain "*.inc". This change prevents includes of "*.c" files, and other unusually named files. Part of 32609.
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-15Merge remote-tracking branch 'tor-github/pr/1535'teor
2019-11-14Avoid redundant typedef of or_options_t and smartlist_t in *_config.hNick Mathewson
Fixes bug 32495.
2019-11-14Run "make autostyle"teor
2019-11-14relay: Disable relay_sys when the relay module is disabledteor
Closes ticket 32245.
2019-11-14relay: Disable relay_periodic when the relay module is disabledteor
Closes ticket 32244.
2019-11-07Use new configuration architecture for crypto optionsNick Mathewson
This is a comparatively simple change.
2019-11-07relay: Stop failing on startup when the relay module is disabledteor
When the relay module is disabled, make "ClientOnly 1" and "DirCache 0" by default. (But keep "ClientOnly 0" and "DirCache 1" as the defaults for the unit tests.) And run "make autostyle". Part of ticket 32410.
2019-11-05Merge branch 'doxygen_libs'Nick Mathewson
2019-11-05Merge remote-tracking branch 'tor-github/pr/1477'teor
2019-11-05config: Run "make autostyle"teor
Part of 32213.