aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirparse
AgeCommit message (Collapse)Author
2023-05-10hs: Descriptor support for PoWDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-05-16Merge branch 'tor-gitlab/mr/489'David Goulet
2022-02-25Fix typosDimitris Apostolou
2022-02-22hs: Encode flow control value in the descriptorDavid Goulet
This simply adds the "flow-control" line, as detailed in prop324, to the descriptor. No decoding is done at this commit. Part of #40506
2021-12-15Fix compiler warnings from ubuntu/jammyDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-09Move published_on from routerstatus_t to vote_routerstatus_t.Nick Mathewson
Nothing breaks here, since all non-voting users of routerstatus_t.published_on have been adjusted or removed in previous commits. We have to expand the API of routerstatus_format_entry() a bit, though, so that it can always get a published time as argument, since it can't get it from the routerstatus any more. This should have no effect on voter behavior.
2021-10-21Implement a MiddleOnly flag for vote generation.Nick Mathewson
This proposal implements part of Prop335; it's based on a patch from Neel Chauhan. When configured to do so, authorities will assign a MiddleOnly flag to certain relays. Any relay which an authority gives this flag will not get Exit, V2Dir, Guard, or HSDir, and might get BadExit if the authority votes for that one.
2021-04-23Remove NEED_SKEY_1024 parsing.Nick Mathewson
Only v2 onion services needed this, and they are now gone. Closes #40374.
2021-03-15Merge branch 'maint-0.4.5'Nick Mathewson
2021-03-15Merge branch 'maint-0.4.4' into maint-0.4.5Nick Mathewson
2021-03-15Merge branch 'maint-0.3.5' into maint-0.4.4Nick Mathewson
2021-03-15Clarify new intended strategy with TROVE-2021-001Nick Mathewson
We're going to disable this feature in all versions for now.
2021-03-15Merge branch 'maint-0.4.5'Nick Mathewson
2021-03-15Merge branch 'maint-0.4.4' into maint-0.4.5Nick Mathewson
2021-03-15Merge branch 'maint-0.3.5' into maint-0.4.4Nick Mathewson
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-19Make dirauths vote the Sybil flag when other flags are zeroed outNeel Chauhan
2021-02-19Disable the dump_desc() function.Nick Mathewson
It can be called with strings that should have been length-delimited, but which in fact are not. This can cause a CPU-DoS bug or, in a worse case, a crash. Since this function isn't essential, the best solution for older Tors is to just turn it off. Fixes bug 40286; bugfix on 0.2.2.1-alpha when dump_desc() was introduced.
2021-01-11Reject obsolete router/extrainfo descs more quietly.Nick Mathewson
Thanks to proposal 315 / ticket #30132, more fields are now required in these documents. But ancient Tors that try to upload obsolete documents were causing the authorities to log warnings about missing fields, and to do so very spammily. We now detect the missing fields before tokenizing, and log at debug. This is a bit of ugliness, but it's probably a safer choice than making _all_ unparseable-desc warnings into debug-level logs. I'm looking at identity-ed25519 in extrainfos and proto in routerdescs because they were (I believe) the latest-added fields in Tor's history: any Tor that lacks them will also lack the other newly required fields. Fixes bug #40238; bugfix on 0.4.5.1-alpha.
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-10-16Fix up vote tests in test_dir_handle_get.Nick Mathewson
These tests used a hardcoded vote with a hardcoded digest. That vote didn't have any pr lines, and so it is now invalid. I've adjusted the testing code so that it mocks the signature-checking, so that we can more easily change the contents of the vote.
2020-10-15Mark as required fields from prop315.Nick Mathewson
This change breaks some unit tests; it's time to fix those in subsequent commits.
2020-08-03Rename protover_contains_long_protocol_names to protover_list_is_invalidNick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ protover_contains_long_protocol_names protover_list_is_invalid
2020-08-03Merge remote-tracking branch 'tor-gitlab/mr/94'Nick Mathewson
2020-07-14Merge branch 'ticket40033_045_01_squashed'Nick Mathewson
2020-07-14Rename blacklist and whitelist wordingDavid Goulet
Closes #40033 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
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;
2020-03-17Merge branch 'maint-0.4.3'Nick Mathewson
2020-03-17Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-03-17Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-02-09dirparse: add helper for recommended/required protocolscypherpunks
2020-02-09dirparse: reject votes with invalid recommended/required protocolscypherpunks
2020-02-09dirparse: curlybraceify if statementscypherpunks
2020-02-09dirparse: reject routerstatus entries with malformed protovercypherpunks
Contrary to its name, protover_contains_long_protocol_names() detects all parse errors, not just long names.
2020-02-09dirparse: reject votes with malformed routerstatus entriescypherpunks
2020-02-06Wrap columnar tables in "clang-format off/on"Nick Mathewson
These tables have aligned comments, so we don't want clang-format to mess with them.
2020-02-05Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
Resolved Conflicts: src/feature/dirparse/parsecommon.c
2020-02-05When parsing tokens, reject early on spurious keys.Nick Mathewson
2020-02-05When parsing, reject >1024-bit RSA private keys sooner.Nick Mathewson
Private-key validation is fairly expensive for long keys in openssl, so we need to avoid it sooner.
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-09routerparse.h: include parsecommon.h when exposing token table.Nick Mathewson
Without this include, our compilation depends more on include order.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \ TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \ CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \ EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \ SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
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*$#);'