aboutsummaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2020-10-26Merge remote-tracking branch 'tor-gitlab/mr/169' into masterGeorge Kadianakis
2020-10-20Set is_padding_timer_scheduled to 0Guinness
When calling `circpad_send_padding_cell_for_callback()`, the flag `is_padding_timer_scheduled` was not resetted to 0 which caused an issue in the circpad simulator. This commit fixes this problem. Fixes #32671.
2020-10-20Merge remote-tracking branch 'tor-gitlab/mr/148' into masterGeorge Kadianakis
2020-10-19Explain why we use "mark_as_used_for_origin_circuit" where we doNick Mathewson
Also, explain why it's relevant for bootstrapping. This is a comments-only patch.
2020-10-13Make OptimisticData always-on.Nick Mathewson
We've been using it for years, and it seems to work just fine. This patch removes the option and its network parameter. Part of #40139
2020-10-13Make "usecreatefast" always-off.Nick Mathewson
Part of #40139, where I'm removing network parameters that we shouldn't be looking at any longer.
2020-10-12Pass the SOCKS request address in relay begin cellsNeel Chauhan
2020-10-06Rename `OUTBOUND_ADDR_EXIT_AND_OR` to `OUTBOUND_ADDR_ANY`.Alexander Færøy
This patch renames the enumeration value in `outbound_addr_t` from `OUTBOUND_ADDR_EXIT_AND_OR` to `OUTBOUND_ADDR_ANY` since with the arrival of `OUTBOUND_ADDR_PT` it no longer makes sense to call the fallback value for "Exit and OR". Instead we rename it to "any". See: https://bugs.torproject.org/5304
2020-09-18Merge remote-tracking branch 'tor-gitlab/mr/137'Alexander Færøy
2020-09-18Add flag for whether an OR conn "counts" for bootstrap trackingNick Mathewson
We set this flag if we've launched the connection in order to satisfy an origin circuit, or when we decide the connection _would_ satisfy an origin circuit. These are the only or_connections we want to consider for bootstrapping: other or_connections are opened because of client EXTEND requests, and they may succeed or fail because of the clients' confusion or misconfiguration. Closes #25061.
2020-09-14Update remaining trac.tpo wiki urlsNick Mathewson
2020-09-01conn: Remove assert on new listener connection when retryingDavid Goulet
Opening a new listener connection can fail in many ways like a bind() permission denied on a low port for instance. And thus, we should expect to handle an error when creating a new one instead of assert() on it. To hit the removed assert: ORPort 80 KeepBindCapabilities 0 Start tor. Then edit torrc: ORPort <some-IP>:80 HUP tor and the assert is hit. Fixes #40073 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-08-25Merge branch 'mr/113'George Kadianakis
2020-08-25Validate address more carefully when checking self-reachabilityNick Mathewson
Previously, we would treat *any* incoming circuit on a non-local channel as meaning that our ORPort was reachable. With this patch, we make sure that the address that the peer _says_ we have is the same as the one we're trying to advertise right now. Closes 20165. Bugfix on 4f5192b2803c706 in 0.1.0.1-rc, when reachability self-tests were first introduced.
2020-08-25Merge remote-tracking branch 'tor-gitlab/mr/115'George Kadianakis
2020-08-25Merge branch 'maint-0.4.4'George Kadianakis
2020-08-25Merge remote-tracking branch 'tor-gitlab/mr/130' into maint-0.4.4George Kadianakis
2020-08-19hs: Don't overwrite DoS parameters on circuit with consensus paramsDavid Goulet
Turns out that the HS DoS defenses parameters were overwritten by the consensus parameters everytime a new consensus would arrive. This means that a service operator can still enable the defenses but as soon as the intro point relay would get a new consensus, they would be overwritten. And at this commit, the network is entirely disabling DoS defenses. Fix this by introducing an "explicit" flag that indicate if the ESTABLISH_INTRO cell DoS extension set those parameters or not. If set, avoid using the consenus at once. We are not bumping the protover HSIntro value for this because 0.4.2.x series is EOL in 1 month and thus 0.4.3.x would be the only series with this bug. We are confident that a backport and then upgrade path to the latest 0.4.4.x stable coming up soon is enough to mitigate this problem in the coming months. It avoids the upgrade path on the service side by keeping the requirement for protover HSIntro=5. Fixes #40109 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-08-14Revise trac.torproject.org urls to refer to gitlab replacements.Nick Mathewson
Closes #40101.
2020-08-12Merge branch 'maint-0.4.4'George Kadianakis
2020-08-12Merge remote-tracking branch 'tor-gitlab/mr/104' into maint-0.4.4George Kadianakis
2020-08-11Merge remote-tracking branch 'tor-gitlab/mr/111'George Kadianakis
2020-08-11Merge branch 'maint-0.4.4'George Kadianakis
2020-08-11Merge remote-tracking branch 'tor-gitlab/mr/102' into maint-0.4.4George Kadianakis
2020-08-07Log number of inbound/outbound ipv4/6 conns as part of heartbeatNick Mathewson
Closes #29113
2020-08-05Replace several C identifiers for ticket 18106.Nick Mathewson
We used to have a single boolean, "FascistFirewall". Ages ago, in tickets #17840 and #9067, we added an improved "ReachableAddresses" mechanism. It's time to rename related identifiers in the code for consistency. This closes #18106. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ fascist_firewall_allows_address reachable_addr_allows \ fascist_firewall_use_ipv6 reachable_addr_use_ipv6 \ fascist_firewall_prefer_ipv6_impl reachable_addr_prefer_ipv6_impl \ fascist_firewall_prefer_ipv6_orport reachable_addr_prefer_ipv6_orport \ fascist_firewall_prefer_ipv6_dirport reachable_addr_prefer_ipv6_dirport \ fascist_firewall_allows_address_addr reachable_addr_allows_addr \ fascist_firewall_allows_address_ap reachable_addr_allows_ap \ fascist_firewall_allows_base reachable_addr_allows_base \ fascist_firewall_allows_ri_impl reachable_addr_allows_ri_impl \ fascist_firewall_allows_rs_impl reachable_addr_allows_rs_impl \ fascist_firewall_allows_rs reachable_addr_allows_rs \ fascist_firewall_allows_md_impl reachable_addr_allows_md_impl \ fascist_firewall_allows_node reachable_addr_allows_node \ fascist_firewall_allows_dir_server reachable_addr_allows_dir_server \ fascist_firewall_choose_address_impl reachable_addr_choose_impl \ fascist_firewall_choose_address reachable_addr_choose \ fascist_firewall_choose_address_base reachable_addr_choose_base \ fascist_firewall_choose_address_rs reachable_addr_choose_from_rs \ fascist_firewall_choose_address_ls reachable_addr_choose_from_ls \ fascist_firewall_choose_address_node reachable_addr_choose_from_node \ fascist_firewall_choose_address_dir_server reachable_addr_choose_from_dir_server
2020-08-03Merge branch 'ticket40081_035' into ticket40081_044Nick Mathewson
Resolves conflicts: src/core/or/channel.c src/test/test_channel.c
2020-08-03Remove channel_is_canonical_is_reliable()Nick Mathewson
This function once served to let circuits continue to be built over version-1 link connections. But such connections are long-obsolete, and it's time to remove this check. Closes #40081.
2020-08-03Wipe address strings from connections before freeing them them.Nick Mathewson
This is a defense-in-depth fix; closes 6198.
2020-08-03Merge branch 'maint-0.4.4'George Kadianakis
2020-08-03Merge remote-tracking branch 'tor-gitlab/mr/79' into maint-0.4.4George Kadianakis
2020-08-03Fix comment on protover_list_is_invalidNick Mathewson
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-08-03Merge remote-tracking branch 'tor-github/pr/1986/head'Nick Mathewson
2020-07-31Code simplifications for AP_CONN_STATE_CONTROLLER_WAITNeel Chauhan
2020-07-29Merge branch 'tor-gitlab/mr/73_squashed'Alexander Færøy
2020-07-29Remove the connection_t.outbuf_flushlen fieldNick Mathewson
This was once used for rate-limiting, but now it's only for accounting. It hasn't served a useful purpose in a long time. Closes ticket 33097.
2020-07-24Don't let a bad IPv6 orport stop our IPv4 bandwidth test.Nick Mathewson
Specifically: do not close IPv4 bandwidth-testing circuits just because our IPv6 orport is unreachable. Attempted fix for #40068.
2020-07-22Merge branch 'maint-0.4.4'David Goulet
2020-07-22Merge branch 'tor-gitlab/mr/77' into maint-0.4.4David Goulet
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-07-22Adjust the rules for warning about too many connections.Nick Mathewson
Previously we tolerated up to 1.5 connections for every relay we were connected to, and didn't warn if we had fewer than 5 connections total. Now we tolerate up to 1.5 connections per relay, and up to 4 connections per authority, and we don't warn at all when we have fewer than 25 connections total. Fixes bug 33880, which seems to have been provoked by our #17592 change in 0.3.5.
2020-07-21relay: Automatically Enable an IPv6 ORPortDavid Goulet
This commit makes it that if the ORPort is set with a single port, it will bind to both global listen IPv4 and IPv6 addresses. To pin an "ORPort <PORT>" to be IPv4 or IPv6, the IPv4Only/IPv6Only flags are honored thus this will _only_ bind on IPv6 for that port value: ORPort 9050 IPv6Only Results in: [::]:9050 ORPort 9051 IPv4Only Results in: [0.0.0.0]:9051 Attempting to configure an explicit IPv4 address with IPv6Only flag is an error and vice versa. Closes #33246 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-21Rename router_get_advertised_*() functions.Nick Mathewson
These now (or_port and dir_port) now have "find" names, since they look at the portcfg first, then at the actual ports from the listeners. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_get_advertised_or_port routerconf_find_or_port \ router_get_advertised_ipv6_or_ap routerconf_find_ipv6_or_ap \ router_has_advertised_ipv6_orport routerconf_has_ipv6_orport \ router_get_advertised_dir_port routerconf_find_dir_port
2020-07-21Combine router_get_advertised_or_port{,by_af_}() functionsNick Mathewson
2020-07-21Merge remote-tracking branch 'tor-gitlab/mr/64'Nick Mathewson
2020-07-17Clean up documentation for connection_t.addressNick Mathewson
2020-07-17Document some channel_matches_extend_info issues that confused me.Nick Mathewson
2020-07-17Clean up documentation for connection_t.addr a bit more.Nick Mathewson