David Goulet
9ba16c4d03
hs-v3: Close client intro circuits if the descriptor is replaced
...
When storing a descriptor in the client cache, if we are about to replace an
existing descriptor, make sure to close every introduction circuits of the old
descriptor so we don't have leftovers lying around.
Ticket 27471 describes a situation where tor is sending an INTRODUCE1 cell on
an introduction circuit for which it doesn't have a matching intro point
object (taken from the descriptor).
The main theory is that, after a new descriptor showed up, the introduction
points changed which led to selecting an introduction circuit not used by the
service anymore thus for which we are unable to find the corresponding
introduction point within the descriptor we just fetched.
Closes #27471 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-18 12:56:51 -04:00
Nick Mathewson
b1891068f1
Merge branch 'maint-0.3.4'
2018-10-17 13:02:23 -04:00
Nick Mathewson
e97adaf8dc
Argh. The unset value for OwningControllerFD is NOT -1.
2018-10-16 17:57:04 -04:00
Nick Mathewson
56a3cef4d7
Merge branch 'bug27849_redux'
2018-10-16 17:33:58 -04:00
rl1987
89c4a3a0b6
Write a comment to explain may_need_rebind condition
2018-10-15 16:18:31 +03:00
rl1987
9bb00a74bc
Refrain from listener rebinding when address families differ
2018-10-15 16:18:31 +03:00
Nick Mathewson
df2b46d18c
Remove a double-newline and improve a comment
2018-10-14 15:33:39 -04:00
Nick Mathewson
2dccef0eb4
Merge branch 'bug27772_squashed'
2018-10-14 15:31:52 -04:00
Nick Mathewson
dddecee291
Initialize some locals in socks5 parsing code.
...
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-10-14 15:25:16 -04:00
Nick Mathewson
370d9922a4
Use the correct function signatures in test_relaycell.c
...
This is now officially an antipattern: please let's never copy a
function declaration in two places again. That's what headers are
for.
2018-10-14 15:25:16 -04:00
Nick Mathewson
965549aa07
Use assertions so GCC LTO doesn't worry about TLS channel conversion
...
Part of #27772
2018-10-14 15:25:16 -04:00
Nick Mathewson
67351f6724
Merge remote-tracking branch 'tor-github/pr/380'
2018-10-12 11:39:37 -04:00
rl1987
9d886185c1
Make sure we're removing conn from old_conns *once*
2018-10-03 15:51:59 +03:00
rl1987
2b146bdb9a
Refrain from using SMARTLIST_DEL_CURRENT in retry_all_listeners
2018-10-03 15:31:49 +03:00
Nick Mathewson
886dc8b0a5
Remove routerparse include from files that dont use it
2018-10-01 11:35:11 -05:00
Nick Mathewson
d199348664
Remove versions.h include from routerparse.h
2018-10-01 11:22:47 -05:00
Nick Mathewson
35db3f8162
Extract addr-policy parsing code.
2018-10-01 11:17:19 -05:00
Nick Mathewson
95e2eb9083
Move summarize_protover_flags to versions.c
2018-10-01 10:48:55 -05:00
Nick Mathewson
4201203845
extract networkstatus parsing to its own file.
2018-10-01 10:46:00 -05:00
Nick Mathewson
cd23903427
Pull detached-signatures code into dirauth.
2018-10-01 10:46:00 -05:00
Nick Mathewson
2be35f4d61
Split microdescriptor parser into its own file.
2018-10-01 10:46:00 -05:00
Nick Mathewson
82f4d3ca75
Move v2 hs parsing into feature/rend
2018-10-01 00:09:00 -05:00
Nick Mathewson
430ca38f70
Split the authority-cert and signature/hash code from routerparse
2018-10-01 00:09:00 -05:00
Nick Mathewson
2f5dc48699
Extract the version-managing code from routerparse.c
...
Leave the versions.h include in routerparse.h for now; I'll remove
it later.
2018-10-01 00:04:58 -05:00
Nick Mathewson
fec3b3bb93
Extract logic for dumping unparseable junk from routerparse.c
2018-10-01 00:04:58 -05:00
Nick Mathewson
6785aa4010
Move routerparse and parsecommon to their own module.
2018-10-01 00:04:06 -05:00
Nick Mathewson
9e65e7a36f
Merge branch 'split_stats'
2018-09-27 16:26:06 -04:00
Nick Mathewson
d0b2b5a202
Always initialize the periodic events list.
...
Various places in our code try to activate these events or check
their status, so we should make sure they're initialized as early as
possible. Fixes bug 27861; bugfix on 0.3.5.1-alpha.
2018-09-27 13:24:36 -04:00
Nick Mathewson
c8f2a6d2fe
Extract the non-stats part of geoip into a new src/lib/geoip.
2018-09-27 10:26:01 -04:00
Nick Mathewson
f403af2207
Split geoip from geoip-related stats.
...
This commit just moves the code to two separate files. The geoip
code still has a few needless dependencies on core/* and features/*.
2018-09-27 09:36:52 -04:00
Nick Mathewson
241c1505cc
Move the predicted ports code out of rephist.c
...
It differs from the rest of the rephist code in that it's actually
necessary for Tor to operate, so it should probably go somewhere
else. I'm not sure where yet, so I'll leave it in the same
directory, but give it its own file.
2018-09-27 08:21:17 -04:00
Nick Mathewson
4f0bc0c8f5
Revise things that had included router.h before
...
Make them only include the headers that they needed, and sort their
headers while we're at it.
2018-09-25 17:57:58 -04:00
Nick Mathewson
3ff58e47d2
Move the "is the network disabled?" functions out of router.c
...
Since this is completely core functionality, I'm putting it in
core/mainloop, even though it depends on feature/hibernate. We'll
have to sort that out in the future.
2018-09-25 17:22:14 -04:00
Nick Mathewson
b8df2318e9
Move routerinfo_t functions out of router.c
...
(It turns out that some of the functions in router.h didn't even
exist any more, so I just got to delete their declarations completely.)
2018-09-25 16:48:00 -04:00
Nick Mathewson
efa978124f
Extract nickname-checking functions from router.c
2018-09-25 16:22:11 -04:00
Nick Mathewson
5c86f3c297
Move the various _describe() functions out of router.c
...
Note that I haven't separated the headers yet (there's still an
2018-09-25 16:13:47 -04:00
Nick Mathewson
fcd0f76134
Extract all the "am I a server" functions from router.c
2018-09-25 16:00:50 -04:00
Nick Mathewson
70539e3d5e
Move all authdir_mode_*() functions into authmode.h
2018-09-25 15:39:24 -04:00
Nick Mathewson
9385b7ec5f
Rename dirauth/mode.h to dirauth/authmode.h
...
This is preparation for having a routermode.h as well
2018-09-25 15:18:21 -04:00
Nick Mathewson
8a350e088b
Move self-test functionality into its own file.
2018-09-25 15:14:57 -04:00
Nick Mathewson
934859cf80
Move key-loading and crosscert-checking out of feature/relay
...
This is also used by onion services, so it needs to go in another
module.
2018-09-25 15:14:57 -04:00
Nick Mathewson
78295904f7
Merge branch 'ticket26744'
2018-09-24 10:56:50 -04:00
Nick Mathewson
ae0cb94b69
Initialize mainloop events earlier, since other stuff may run them.
...
Fixes a stem test failure; bugfix on c7ce6b9821
. Bug
not in any released Tor.
2018-09-22 17:40:04 -04:00
Nick Mathewson
7d9bea6a77
But, actually move systemd_watchdog_timer free into mainloop.c
2018-09-21 16:49:20 -04:00
cypherpunks
5c0dd1aa90
move protover_rust.c to core/or/
...
Missed in 667a6e8fe9
.
2018-09-21 20:14:53 +00:00
Nick Mathewson
194acfb51d
Split directory.c code into several modules
...
Parts of this C file naturally belong in dircache, dirclient, and
dircommon: so, move them there.
2018-09-21 12:57:22 -04:00
Nick Mathewson
0e4c42a912
Merge remote-tracking branch 'ahf-github/asn/bugs4700_2'
2018-09-21 09:40:16 -04:00
Nick Mathewson
9399c579e5
Merge branch 'split_mainloop_onion'
2018-09-21 09:37:23 -04:00
Nick Mathewson
9b0a17a74f
Merge branch 'maint-0.3.4'
2018-09-21 09:36:31 -04:00
Nick Mathewson
c7ce6b9821
Split main.c into main.c and mainloop.c
...
The main.c code is responsible for initialization and shutdown;
the mainloop.c code is responsible for running the main loop of Tor.
Splitting the "generic event loop" part of mainloop.c from the
event-loop-specific part is not done as part of this patch.
2018-09-21 09:14:06 -04:00