aboutsummaryrefslogtreecommitdiff
path: root/src/core/proto
AgeCommit message (Collapse)Author
2020-09-14Update remaining trac.tpo wiki urlsNick 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-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-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-04-30net: Make all address bytes functions take uint8_t *teor
Part of 33817.
2020-02-18Move some declarations into proto_ext_or.hNick Mathewson
They are for functions declared in that file.
2020-01-17Merge remote-tracking branch 'tor-github/pr/1529'Nick Mathewson
2020-01-13Split core/include.am into per-subdirectory include.am filesNick Mathewson
Closes ticket 32137.
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-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-11Handle binary IPv6 addresses and bracketed strings in RESOLVE_PTR.liberat
When a SOCKS5 client sends a RESOLVE_PTR request, it must include either an IPv4 or IPv6 address. In the past this was required to be a binary address (address types 1 or 4), but since the refactoring of SOCKS5 support in Tor 0.3.5.1-alpha, strings (address type 3) are also allowed if they represent an IPv4 or IPv6 literal. However, when a binary IPv6 address is provided, parse_socks5_client_request converts it into a string enclosed in brackets. This doesn't match what string_is_valid_ipv6_address expects, so this would fail with the error "socks5 received RESOLVE_PTR command with hostname type. Rejecting." By replacing string_is_valid_ipv4_address/string_is_valid_ipv6_address with tor_addr_parse, we accept strings both with and without brackets. This fixes the handling of binary addresses, and also improves symmetry with CONNECT and RESOLVE requests. Fixes bug 32315.
2019-11-04directory-level doxygen for "src/core"Nick Mathewson
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-26doxygen: add @file declarations for src/core/protoNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it. These declarations also turned up a doxygen warning for proto_socks.c; I fixed that too.
2019-08-05Teach include-checker about advisory rulesNick Mathewson
A .may_includes file can be "advisory", which means that some violations of the rules are expected. We will track these violations with practracker, not as automatic errors.
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-02-08Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-26Allow empty username/password in SOCKS5 username/password auth messagerl1987
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-10-14Merge branch 'bug27772_squashed'Nick Mathewson
2018-10-14Initialize some locals in socks5 parsing code.Nick Mathewson
These confused GCC LTO, which thought they might be used uninitialized. I'm pretty sure that as long as 'res' indicates success, they will always be set to something, but let's unconfuse the compiler in any case.
2018-09-21move protover_rust.c to core/or/cypherpunks
Missed in 667a6e8fe9b8169e86f3ab889c4ea8af845d6939.
2018-09-18Assert that some trunnel _new() functions return non-NULLNick Mathewson
The trunnel functions are written under the assumption that their allocators can fail, so GCC LTO thinks they might return NULL. In point of fact, they're using tor_malloc() and friends, which can't fail, but GCC won't necessarily figure that out. Fixes part of #27772.
2018-07-16Avoid a use-after-null-check in proto_socks.cNick Mathewson
Coverity rightly complains that early in the function we're checking whether username is NULL, and later we're passing it unconditionally to strlen(). Fixes CID 1437967. Bug not in any released Tor.
2018-07-12SOCKS: Always free username/password before setting them.Nick Mathewson
This fixes a memory leak found by fuzzing.
2018-07-12Merge branch 'socks_trunnel4_squashed' into socks_trunnel4_squashed_mergedNick Mathewson
2018-07-12Remove a redundant typedef in proto_ext_or.hRoger Dingledine
2018-07-05Whoops. Protover.[ch] belong in src/core/orNick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.