aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control
AgeCommit message (Collapse)Author
2020-10-07Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson
2020-10-07Make HSFETCH take the decoded length into account, not the base32 oneNeel Chauhan
2020-08-20v3 control: Persist ONION_CLIENT_AUTH_ADD client nameNeel Chauhan
2020-06-22Consistently use 'address' in Invalid v3 address responses to ↵Miguel Jacq
ONION_CLIENT_AUTH commands
2020-06-05Merge remote-tracking branch 'tor-github/pr/1902/head'Nick Mathewson
2020-05-21Merge branch 'tor-github/pr/1861'George Kadianakis
2020-05-21Check for NULL from tor_dup_ip()rl1987
2020-05-07Merge remote-tracking branch 'tor-github/pr/1880/head'Nick Mathewson
2020-05-06Merge branch 'maint-0.4.3'Nick Mathewson
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-06btrack_orconn_cevent.c: Add a missing "break;"Nick Mathewson
2020-05-06Merge branch 'maint-0.4.3'Nick Mathewson
Amazingly, this time we had no merge conflicts with "falls through" comments.
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; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.2 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; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.1 version.)
2020-05-05relay: Rename relay_resolve_addr.{c|h} fileDavid Goulet
New name is more accurate semantically. Closes #33789 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-05relay: New file relay_resolve_addr.{c|h}David Goulet
This commit moves router_pick_published_address() and the related helper functions into the new file. The log_addr_has_changed() function has been made public in router.h so we can use it in relay_resolve_addr.c. This is a refactoring as part of Sponsor 55. Only code movement at this commit. Part of #33789 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-13Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-13hs-v3: Don't allow registration of an all-zeroes client auth key.George Kadianakis
The client auth protocol allows attacker-controlled x25519 private keys being passed around, which allows an attacker to potentially trigger the all-zeroes assert for client_auth_sk in hs_descriptor.c:decrypt_descriptor_cookie(). We fixed that by making sure that an all-zeroes client auth key will not be used. There are no guidelines for validating x25519 private keys, and the assert was there as a sanity check for code flow issues (we don't want to enter that function with an unitialized key if client auth is being used). To avoid such crashes in the future, we also changed the assert to a BUG-and-err.
2020-04-12Return a descriptive error for 'GETINFO status/fresh-relay-descs'Neel Chauhan
2020-03-26Add a SUBSYS_DECLARE_LOCATION() to every subsystem.Nick Mathewson
2020-03-05Merge branch 'clang_format_prep_3'Nick Mathewson
2020-02-25Merge remote-tracking branch 'tor-github/pr/1750/head'Nick Mathewson
2020-02-18Remember dirctory bw usage, and log it in the heartbeatNick Mathewson
Closes ticket 32720.
2020-02-13Re-order most subsystems to correspond to dependency order.Nick Mathewson
2020-02-10Merge branch 'bug33104_041'Nick Mathewson
2020-02-10Use semicolons after HT_PROTOTYPE and HT_GENERATE.Nick Mathewson
2020-02-06Use parentheses to avoid mis-indentations of stringified macro argsNick Mathewson
clang-format sometimes thinks that "#name" should be written as "# name" if it appears at the start of a line. Using () appears to suppress this, while confusing Coccinelle.
2020-02-06Use a compile-time assert in control_events.hNick Mathewson
(The original idiom here led clang-format to generating a too-wide line.)
2020-02-05Fix a memory leak in handling GETINFO.Nick Mathewson
Fixes bug 33103; bugfix on 0.4.3.1-alpha.
2020-01-30Rewrite control_event_signal() to use signal_table.Nick Mathewson
When we added the ACTIVE and DORMANT virtual signals, we taught the signal command to handle them, but we didn't teach SIGNAL event to report them. To solve this problem and prevent it from recurring, this patch revises the implementation of control_event_signal() to use the same signal_table that handle_control_signal() uses. This way, the two controller commands can't become out of sync. Fixes bug 33104; bugfix on 0.4.0.1-alpha.
2020-01-24fix leak in GETCONFTaylor Yu
Fix a memory leak introduced by refactoring of control reply formatting code. Fixes bug 33039; bugfix on 0.4.3.1-alpha.
2020-01-16Merge branch 'ticket32487_squashed' into ticket32487_squashed_and_mergedNick Mathewson
Resolved conflicts in src/core/include.am
2020-01-16Move dirserv_get_routerdescs() to control_getinfo.cNick Mathewson
This function had some XXX comments indicating (correctly) that it was not actually used by the dirserver code, and that only the controller still used it.
2020-01-13Split core/include.am into per-subdirectory include.am filesNick Mathewson
Closes ticket 32137.
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09control_hs.h: use a couple of struct delcarationsNick Mathewson
Doing this frees us from some assumptions about include order.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-06Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_mergedNick Mathewson
2020-01-06circuit: Implement haproxySuphanat Chunhapanya
2019-12-20Run "make autostyle"teor
2019-12-09Rename control_reply_add_1kvTaylor Yu
Part of ticket 30984.
2019-12-08simplify getinfo using reply linesTaylor Yu
Simplify handle_control_getinfo() by using the new reply lines abstraction. Previously, this function explicitly checked for whether it should generate a MidReplyLine, a DataReplyLine, or an EndReplyLine. control_write_reply_lines() now abstracts this check. Part of #30984.
2019-12-08use control reply lines for protocolinfoTaylor Yu
Simplify handle_control_protocolinfo() by using the new reply line abstraction. Part of #30984.
2019-12-08refactor handle_control_protocolinfoTaylor Yu
Factor out the parts of handle_control_protocolinfo() that assemble the AUTHMETHODS and COOKIEFILE strings. Part of #30984.
2019-12-08simplify getconf by using reply linesTaylor Yu
In handle_control_getconf(), use the new control reply line abstraction to simplify output generation. Previously, this function explicitly checked for whether it should generate a MidReplyLine or an EndReplyLine. control_write_reply_lines() now abstracts this check. Part of #30984.
2019-12-08reply lines structuresTaylor Yu
Part of #30984.
2019-12-04Merge branch 'ticket32609_squashed'Nick Mathewson
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.