Nick Mathewson
2c15b65381
Make the NET_PARTICIPANT role dependent on user activity
...
This patch implements all of 28337, except for the part where we
turn off the role if we've been idle for a long time.
2018-11-15 11:17:22 -05:00
Nick Mathewson
b1891068f1
Merge branch 'maint-0.3.4'
2018-10-17 13:02:23 -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
2dccef0eb4
Merge branch 'bug27772_squashed'
2018-10-14 15:31:52 -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
6785aa4010
Move routerparse and parsecommon to their own module.
2018-10-01 00:04:06 -05: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
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
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
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
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
Nick Mathewson
f25323fe3f
Fix socket accounting with ORConn sockets.
...
When we close a socket via tor_tls_free(), we previously had no way
for our socket accounting logic to learn about it. This meant that
the socket accounting code would think we had run out of sockets,
and freak out.
Fixes bug 27795; bugfix on 0.3.5.1-alpha.
2018-09-20 12:52:29 -04:00
Nick Mathewson
e43ae24e7d
Merge branch 'nss_27451'
2018-09-14 10:22:38 -04:00
David Goulet
4b646e30d8
conn: Fix memleaks in retry_all_listeners
...
Fixes #27670
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-12 17:51:56 -04:00
Nick Mathewson
fed2c26e60
Report UNIX connection addresses that we opened correctly.
...
This is an aside on ticket27670.
2018-09-12 17:42:24 -04:00
Nick Mathewson
9f5f67bda2
Use tor_tls_release_socket() to avoid double-closed sockets on NSS
...
Closes ticket 27451; bug not in any released Tor.
2018-09-12 11:32:15 -04:00
Nick Mathewson
62743912bc
Merge branch 'pr278_squashed'
2018-09-12 09:06:35 -04:00
rl1987
d8157097b4
Always include socket rebinding code
2018-09-12 09:06:16 -04:00
rl1987
fbd50f5994
Avoid mentioning ticket number in comments
2018-09-12 09:06:16 -04:00
rl1987
9f5431c79f
Comments/explanation for #17873
2018-09-12 09:06:16 -04:00
rl1987
74a474a2e7
Minor code cleanups
2018-09-12 09:06:16 -04:00
rl1987
27c868eff1
Log a notice *after* creating connection
2018-09-12 09:06:16 -04:00
rl1987
d548453abd
Log a notice when changing to/from wildcard IP address
2018-09-12 09:06:14 -04:00
rl1987
9f7ed1d04e
Always close old listeners in retry_all_listeners
2018-09-12 09:05:39 -04:00
rl1987
f04e0bd5d6
Refrain from compiling socket rebinding code on system that don't need it
2018-09-12 09:05:39 -04:00
rl1987
c99bb8b6ea
Try rebinding new listener after closing old one if first bind failed with EADDRINUSE
2018-09-12 09:05:36 -04:00
Nick Mathewson
22e2403145
Revert "Avoid double-close on TCP sockets under NSS."
...
This reverts commit b5fddbd241
.
The commit here was supposed to be a solution for #27451 (fd
management with NSS), but instead it caused an assertion failure.
Fixes bug 27500; but not in any released Tor.
2018-09-06 11:06:30 -04:00
Nick Mathewson
0db5c54957
Merge branch 'nss_squashed' into nss_merge
2018-09-04 20:21:07 -04:00
Nick Mathewson
b5fddbd241
Avoid double-close on TCP sockets under NSS.
2018-09-04 14:52:35 -04:00
cypherpunks
0cd72a2833
core/mainloop: more comments documenting connection.c
2018-08-27 01:32:34 +00:00
cypherpunks
309961138b
core/mainloop: fix documentation of connection_handle_write_impl()
...
Inaccurate since d9746bd468f551d1ada57d962b20eddd15256ce9.
2018-08-27 01:07:01 +00:00
rl1987
ed0ee340d4
Refactoring: Move code that creates listener for port into new function
2018-08-18 11:26:38 +03:00
Nick Mathewson
ef486e3c02
Fix every include path changed in the previous commit (automated)
...
I am very glad to have written this script.
2018-07-05 17:15:50 -04:00
Nick Mathewson
63b4ea22af
Move literally everything out of src/or
...
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.
2018-07-05 17:15:50 -04:00