Nick Mathewson
2f657a1416
Remove all users of addr_port_lookup outside of address.c
...
This function has a nasty API, since whether or not it invokes the
resolver depends on whether one of its arguments is NULL. That's a
good way for accidents to happen.
This patch incidentally makes tor-resolve support socks hosts on
IPv6.
2018-07-10 13:23:37 -04:00
Nick Mathewson
c2ddb7b231
Move tor_addr_{,port_}lookup to resolve.c
2018-07-10 13:00:02 -04:00
Nick Mathewson
5d8336c182
Refactor ipv[46].[ch]
...
These are now combined into an inaddr.[ch], since their purpose is
to implement functions for struct in_addr and struct in6_addr.
The definitions for in6_addr and its allies are now in a separate
header, inaddr_st.h.
Closes ticket 26532.
2018-07-10 12:50:38 -04:00
Neel Chauhan
6d58c20d94
Fix build on FreeBSD post-refactor
2018-07-10 12:32:14 -04:00
Nick Mathewson
ef106ce788
Document the headers in src/app/config/
2018-07-10 12:28:31 -04:00
Nick Mathewson
4f42c923d6
File-level summary documentation for src/lib/*/*.[ch]
2018-07-10 12:22:01 -04:00
Nick Mathewson
e3e6335a08
Add controller support for listing ExtORPort and HTTPTunnelPorts
...
Closes ticket 26647.
2018-07-10 10:50:43 -04:00
Nick Mathewson
951d59d706
Use tor_getline() in dirserv.c to remove its upper line limit.
...
Closes ticket 26223.
2018-07-10 10:36:49 -04:00
Nick Mathewson
6574d4bd27
Refactor dirserv_read_measured_bandwidths to have a single exit point
2018-07-10 10:36:49 -04:00
Nick Mathewson
b04d719c10
Integrate getdelim() and getline() support into Tor.
2018-07-10 10:36:49 -04:00
Nick Mathewson
1604c0fe0e
Add the compatibility definition for getdelim.c from netbsd.
...
We shouldn't actually need this code nearly anywhere we build:
getdelim is POSIX, and mingw provides it.
2018-07-10 10:14:24 -04:00
Nick Mathewson
5ce348c4c7
Bump to 0.3.4.4-rc-dev
2018-07-09 15:17:38 -04:00
Nick Mathewson
f5e3bcb60b
Bump to 0.3.3.8-dev.
2018-07-09 15:17:16 -04:00
Nick Mathewson
19f2057d49
Fix some lingering windows compilation issues from Jenkins.
...
These were caused by the recent refactoring.
2018-07-09 12:54:40 -04:00
Nick Mathewson
eb856a3e51
strcasecmp should not take a size_t argument
2018-07-09 11:17:23 -04:00
Matt Traudt
d20feddfcc
Lower log level of "Scheduler of type KIST has been enabled" to INFO
2018-07-09 10:48:43 -04:00
Nick Mathewson
98dff5df3f
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 10:17:20 -04:00
Nick Mathewson
250e0fc1c4
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-09 10:17:20 -04:00
Nick Mathewson
1b81c4b5f3
Merge branch 'maint-0.3.4'
2018-07-09 10:17:20 -04:00
Nick Mathewson
6ad2c2b92f
Merge remote-tracking branch 'github/bug26269_031' into maint-0.3.2
2018-07-09 10:17:17 -04:00
Nick Mathewson
e7463be39b
Merge branch 'maint-0.3.4'
2018-07-09 10:16:51 -04:00
Nick Mathewson
83de46eb25
Changes file and comment for 25928.
2018-07-09 10:16:48 -04:00
Nick Mathewson
529faef28e
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 10:15:16 -04:00
Nick Mathewson
69918629f5
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-09 10:14:43 -04:00
Nick Mathewson
4a604d9938
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-09 10:14:43 -04:00
Nick Mathewson
8b53dfc362
Merge branch 'bug26269_029' into maint-0.2.9
2018-07-09 10:14:39 -04:00
Nick Mathewson
7746b071d8
Merge remote-tracking branch 'gsomlo/gls-single-da'
2018-07-09 09:59:46 -04:00
Nick Mathewson
a1a55a33c2
Merge branch 'bug26488'
2018-07-09 09:37:14 -04:00
rl1987
46998fc8fd
Validate that DirAuthority address is IPv4
2018-07-09 09:37:09 -04:00
Nick Mathewson
03283c00d8
Merge remote-tracking branch 'rl1987/bug26525'
2018-07-09 09:31:12 -04:00
Nick Mathewson
532873a924
Bump to 0.3.3.8
2018-07-09 09:24:07 -04:00
Nick Mathewson
9320100d6e
Bump to 0.3.3.4-rc
2018-07-09 09:23:39 -04:00
Nick Mathewson
a95cfb8a58
Clear all control.c flags on control_free_all()
...
Fixes bug 25512.
(Cherry-picked from 3519d0c808
2018-07-09 09:20:45 -04:00
Nick Mathewson
8e3a52e5c3
Merge branch 'maint-0.3.4'
2018-07-09 09:14:41 -04:00
Nick Mathewson
75d9db9e5b
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 09:14:37 -04:00
Nick Mathewson
f721a08220
Merge remote-tracking branch 'catalyst-github/bug26455_033' into maint-0.3.3
2018-07-09 09:13:58 -04:00
Nick Mathewson
75f7064a13
Merge branch 'maint-0.3.4'
2018-07-09 09:11:42 -04:00
Nick Mathewson
d3894dc34b
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-09 09:11:41 -04:00
Nick Mathewson
1af69c1812
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 09:11:41 -04:00
Nick Mathewson
451a84cecb
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-09 09:11:41 -04:00
Nick Mathewson
fead22fb2a
Merge remote-tracking branch 'mikeperry/bug25705_v3_033' into maint-0.3.3
2018-07-09 09:08:58 -04:00
Nick Mathewson
b8554dd880
Make Tor compile with --disable-memory-sentinels again
2018-07-09 08:44:16 -04:00
Kaidan
abeb07a1bf
Made 'auto' keyword in torrc case insensitive
2018-07-08 00:15:16 +10:00
Karsten Loesing
9faa28b60e
Update geoip and geoip6 to the July 3 2018 database.
2018-07-06 20:54:03 +02:00
Nick Mathewson
10c782d7fa
Move ntmain.c into libtor-app again
...
It's needed by main.c
Fixes bug 26662; bug not in any released Tor.
2018-07-06 13:59:40 -04:00
Nick Mathewson
50963f36d7
Actually sort the lines in src/core/include.am
2018-07-05 17:15:50 -04:00
Nick Mathewson
667a6e8fe9
Whoops. Protover.[ch] belong in src/core/or
2018-07-05 17:15:50 -04:00
Nick Mathewson
f720a5a439
Fix everything that previously referred to src/or
2018-07-05 17:15:50 -04:00
Nick Mathewson
5f51c2de8b
Fix our build system to know the new locations of the src/or stuff
2018-07-05 17:15:50 -04: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
Nick Mathewson
81cb0afb2b
Start splitting src/or
...
This is a very gentle commit that just lays the groundwork in the
build system: it puts the include files to build libtor-app.a into
src/core, and to build the tor executable into src/app. The
executable is now "src/app/tor".
2018-07-05 17:15:50 -04:00
Nick Mathewson
4eac5c6ce6
And tell build.rs to stop looking in src/common
2018-07-05 17:15:24 -04:00
Nick Mathewson
c73bb9937d
Fix build.rs to handle removed common.
2018-07-05 17:14:55 -04:00
Nick Mathewson
753b797ca4
Fix up .may_includes for evloop.
2018-07-05 15:50:20 -04:00
Nick Mathewson
1dd5b5f441
Add a missing include.
2018-07-05 15:44:33 -04:00
Nick Mathewson
2d69c32bb6
Clean up include paths for libtor-evloop (automated)
2018-07-05 15:22:17 -04:00
Nick Mathewson
1e417b7275
All remaining files in src/common belong to the event loop.
2018-07-05 15:22:17 -04:00
Nick Mathewson
947de40d19
Move openbsd-malloc responsibility to lib/malloc
...
(Note that this is not believed to work, but we may as well have it
in the right place till we remove it)
2018-07-05 15:07:08 -04:00
Nick Mathewson
4593829861
Remove util.h
...
Inline its contents (which were all includes) into or.h, and some of
its contents into other places that didn't include or.h at all.
2018-07-05 15:04:18 -04:00
Nick Mathewson
0adcfbc7c8
Move address_set to src/or
...
This is temporary, until src/or is split.
Putting this in containers would be another logical alternative,
except that addresses depend on containers, and we don't like
cycles.
2018-07-05 14:51:07 -04:00
Nick Mathewson
24c0f83185
Move socks5_status.h to src/lib/net
...
There might be a better place for it in the long run, but this is
the best I can think of for now.
2018-07-05 14:48:29 -04:00
Nick Mathewson
0e4b1781f4
Move handles.h to src/lib/container
...
There might be a better place for it in the long run, but this is
the best we can think of for now.
2018-07-05 14:45:34 -04:00
Nick Mathewson
3d610363ef
Include compat_string.h in smartlist.c
...
We need this for strcasecmp on (some) Windows build environments.
Fix from Gisle Vanem.
2018-07-05 13:53:17 -04:00
Nick Mathewson
fecb8214d5
Try to use stricmp variants that MSDN actually recommends
...
Per recommendation by Gisle Vanem
2018-07-05 13:51:50 -04:00
Gabriel L. Somlo
97fad99483
Allow single DA if explicitly configured
...
When on a private network a single directory authority is explicitly
configured, allow that DA's instace of tor to pick itself as its own
DA, by having router_pick_dirserver_generic() set the PDS_ALLOW_SELF
flag when the list of potential sources contains only one element.
This would subsequently allow router_pick_trusteddirserver_impl() to
calculate is 'requreother' condition as 'false', enabling it to pick
itself as a valid DA candidate.
Fixes #25928
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2018-07-03 14:58:47 -04:00
Nick Mathewson
2878dad9db
Merge branch 'maint-0.3.4'
2018-07-03 13:31:26 -04:00
Nick Mathewson
32d9d69350
Merge remote-tracking branch 'github/bug26568_034' into maint-0.3.4
2018-07-03 13:16:37 -04:00
Nick Mathewson
df98582851
Merge remote-tracking branch 'github/ticket26626'
2018-07-03 12:52:43 -04:00
Nick Mathewson
fe8f774820
Merge branch 'bug26522'
2018-07-03 11:34:36 -04:00
rl1987
d0525c38d6
Refrain from potentially insecure usage of strncat()
2018-07-03 11:34:14 -04:00
Nick Mathewson
77e678c20d
Merge remote-tracking branch 'github/shrink_or_h_more'
2018-07-03 11:09:54 -04:00
Nick Mathewson
02a4442524
Fix up some windows compilation issues.
...
These were mostly cases where our previous macros had been casting,
and the values that we were trying to printf were not in fact
uint64_t.
2018-07-03 11:00:18 -04:00
Nick Mathewson
d5a3bb960d
Retire U64_TO_DBL and DBL_TO_U64
...
These were necessary long ago to work around a bug in VC6.
2018-07-03 10:45:43 -04:00
Nick Mathewson
9568c0ce3d
Return U64_PRINTF_ARG and U64_FORMAT
...
The standard is printf("%"PRIu64, x);
2018-07-03 10:40:59 -04:00
Nick Mathewson
52884f56d4
Replace U64_LITERAL with the standard UINT64_C
2018-07-03 10:33:50 -04:00
Nick Mathewson
cf0b07c2e5
Retire some unused (or nearly unused) macros.
2018-07-03 10:31:19 -04:00
Nick Mathewson
4638be5312
Use the standard SHRT_MAX name.
2018-07-03 10:28:10 -04:00
Nick Mathewson
c75215c23a
Clean up various things that broke with our stdint.h changes
...
Casting before printf was necessary; now it's not so smart.
We don't have SIZEOF_UINT8_T any more.
2018-07-03 10:26:06 -04:00
Nick Mathewson
e2a94dc481
Require stdint.h and inttypes.h
...
We've been silently requiring stdint.h for a while now, and nobody
has complained. Closes ticket 26626.
2018-07-03 10:25:31 -04:00
Nick Mathewson
a01b4d7f87
Merge remote-tracking branch 'rl1987/ticket26527'
2018-07-03 09:53:46 -04:00
Nick Mathewson
a4e8f94507
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-03 09:48:03 -04:00
Nick Mathewson
4c094436c5
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-03 09:48:03 -04:00
Nick Mathewson
d38e474950
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-03 09:48:03 -04:00
Nick Mathewson
228d25ddf6
Merge branch 'maint-0.3.4'
2018-07-03 09:48:03 -04:00
rl1987
439b528f25
Rename sandbox_getaddrinfo() et. al.
2018-07-03 15:53:39 +03:00
rl1987
fedb3e46ec
Remove ATTR_NONNULL macro
2018-07-03 12:33:09 +03:00
Nick Mathewson
dfdf32404c
Partially revert "Use tor_addr_from_getsockname() in several places"
...
This reverts part of commit 6ed384b827
, in order to
fix bug 26568. Bugfix on 0.3.4.1-alpha.
2018-07-02 16:11:02 -04:00
Nick Mathewson
3baf3d01cb
hs_ntor_ref.py: pass only strings to subprocess.Popen
...
Recent Python3 versions seem to require this on Windows.
Fixes bug 26535; bug copied from ntor_ref.py on 0.3.1.1-alpha.
2018-07-02 14:23:26 -04:00
Nick Mathewson
fc5f8b6931
ntor_ref.py: pass only strings to subprocess.Popen
...
Recent Python3 versions seem to require this on Windows.
Fixes bug 26535; bug introduced in f4be34f70d
, which
was apparently intended itself as a Python3 workaround.
2018-07-02 14:18:41 -04:00
Nick Mathewson
bfcfeaed07
Merge branch 'mikeperry_bug26214-rebased_squashed' into maint-0.3.4
2018-07-02 13:22:07 -04:00
Nick Mathewson
c8ccd028a7
Don't redefine str(n)casecmp on windows unless they're missing
...
When we do redefine them, use inline functions instead of #define.
This fixes a latent code problem in our redefinition of these
functions, which was exposed by our refactoring: Previously, we
would #define strcasecmp after string.h was included, so nothing bad
would happen. But when we refactored, we would sometimes #define it
first, which was a problem on mingw, whose headers contain
(approximately):
inline int strcasecmp (const char *a, const char *b)
{ return _stricmp(a,b); }
Our define turned this into:
inline int _stricmp(const char *a, const char *b)
{ return _stricmp(a,b); }
And GCC would correctly infer that this function would loop forever,
rather than actually comparing anything. This caused bug 26594.
Fixes bug 26594; bug not in any released version of Tor.
2018-07-02 11:50:17 -04:00
Nick Mathewson
cb1a3674eb
File-level documentation for some of src/lib.
2018-07-01 20:22:55 -04:00
Nick Mathewson
83a4946e7b
Prune the .may_include files a bit; detect unused lines in them
2018-07-01 18:14:28 -04:00
Nick Mathewson
518ebe14dc
fixup! Extract or_options_t from or.h
2018-07-01 16:02:33 -04:00
Nick Mathewson
8d562c040f
fixup! Remove system headers from or.h
2018-07-01 15:31:18 -04:00
Nick Mathewson
6c440da926
Remove system headers from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
13116378b1
Extract or_options_t from or.h
...
I decided to have this file included from config.h, though, since it
is used nearly everywhere.
2018-07-01 15:20:37 -04:00
Nick Mathewson
986d761510
Extract or_state_t to its own header.
...
Fewer modules needed this than I had expected.
2018-07-01 15:20:37 -04:00
Nick Mathewson
f75357ec35
Pull a couple more enums from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
6ccd98f93e
Move ext_or_cmd_t to proto_ext_or
2018-07-01 15:20:37 -04:00
Nick Mathewson
49f88e77e5
Extract more constants from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
f54a5cbfb6
Extract addr_policy_t into a new header.
2018-07-01 15:20:37 -04:00
Nick Mathewson
6da0311d2c
Extract various enums and tiny structs from or.h
...
These all have a logical header to go in.
2018-07-01 15:20:37 -04:00
Nick Mathewson
1743dac078
Minimize headers that include crypto_formats and x25519 stuff
2018-07-01 15:20:37 -04:00
Nick Mathewson
500826479a
Remove other needless includes include from or/*.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
471104eaa5
Remove needless includes from or.h
...
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
2018-07-01 15:20:37 -04:00
Nick Mathewson
7a61a92870
Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header.
2018-07-01 11:25:29 -04:00
Nick Mathewson
cf8c3abff1
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-01 10:22:21 -04:00
Nick Mathewson
adcd1d8b9a
Merge branch 'maint-0.3.4'
2018-07-01 10:22:21 -04:00
Nick Mathewson
9aeef05f8f
Merge remote-tracking branch 'dgoulet/bug26523_033_01' into maint-0.3.3
2018-07-01 10:22:18 -04:00
Nick Mathewson
43dc92441d
Tabify all of the .am files.
2018-07-01 09:37:28 -04:00
Nick Mathewson
028523c801
Merge branch 'maint-0.3.4'
2018-06-30 09:15:39 -04:00
Nick Mathewson
e042727cf0
Merge remote-tracking branch 'catalyst-github/bug25895_034-squashed' into maint-0.3.4
2018-06-30 09:15:34 -04:00
Nick Mathewson
57155d38a3
Merge branch 'maint-0.3.4'
2018-06-29 23:12:03 -04:00
Nick Mathewson
8093a63f95
Restor EOL@EOF in routerlist.c
2018-06-29 23:08:45 -04:00
Nick Mathewson
ce940c8c09
Add another winsock2 include, for timeval in procmon.
2018-06-29 19:17:24 -04:00
Nick Mathewson
5921b23e15
add an include to fix macos, and probably bsd too
2018-06-29 14:03:13 -04:00
Nick Mathewson
ed84dab8b4
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-06-29 13:49:43 -04:00
Nick Mathewson
36c372581f
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:49:43 -04:00
Nick Mathewson
75a6e7e256
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:49:43 -04:00
Nick Mathewson
cd3f957219
Merge branch 'maint-0.3.4'
2018-06-29 13:49:43 -04:00
Nick Mathewson
a3ec89a4f8
Merge branch 'maint-0.2.9' into maint-0.3.1
2018-06-29 13:49:43 -04:00
Nick Mathewson
3c0a63c40f
Fix a memory error in test_shared_random
...
Bug not in any released Tor.
2018-06-29 13:49:02 -04:00
Nick Mathewson
d583459d58
Fix some memory errors in the recent coverity fixes.
...
Found by asan on travis :/
2018-06-29 13:48:36 -04:00
Nick Mathewson
92b4996b23
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:07:13 -04:00
Nick Mathewson
d3ecb3a8d6
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:07:13 -04:00
Nick Mathewson
1f389dadd0
Merge branch 'maint-0.3.4'
2018-06-29 13:07:13 -04:00
Nick Mathewson
6e9d5fc4ec
Merge remote-tracking branch 'ahf-github/maint-0.3.2' into maint-0.3.2
2018-06-29 13:07:07 -04:00
Nick Mathewson
7a47379f25
Merge branch 'maint-0.3.4'
2018-06-29 13:06:16 -04:00
Nick Mathewson
f82f8179e6
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:06:15 -04:00
Nick Mathewson
f6b30a97a9
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:06:15 -04:00
Nick Mathewson
68dfbd5ef4
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-06-29 13:06:15 -04:00
Nick Mathewson
b89a66e997
Merge remote-tracking branch 'ahf-github/maint-0.3.0' into maint-0.3.1
2018-06-29 13:06:11 -04:00
Nick Mathewson
419077c26d
Merge remote-tracking branch 'ahf-github/maint-0.3.1' into maint-0.3.1
2018-06-29 13:06:08 -04:00
Nick Mathewson
1a5be3c5e7
Merge branch 'maint-0.3.4'
2018-06-29 13:03:00 -04:00
Nick Mathewson
5ab23e03fa
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:02:56 -04:00
Nick Mathewson
df896ed632
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:00:56 -04:00
Nick Mathewson
fe2588a5a8
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-06-29 13:00:56 -04:00
Nick Mathewson
1385a5118d
Merge branch 'maint-0.2.9' into maint-0.3.1
2018-06-29 13:00:56 -04:00
Nick Mathewson
9d5b815dca
Add a missing include to timers, to make windows happier
2018-06-29 12:59:43 -04:00
Nick Mathewson
6ac64e16ed
Eliminate compat.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
077176a34c
Stop using util.h and compat.h in src/trunnel/
2018-06-29 12:21:52 -04:00
Nick Mathewson
666e3e5ec6
Stop using util.h and compat.h in src/tools
2018-06-29 12:21:52 -04:00
Nick Mathewson
4212a135e1
Remove util.h and compat.h includes from src/common
2018-06-29 12:21:52 -04:00
Nick Mathewson
35e1c497aa
Combine compat.h into util.h
...
This is now just a collection of frequently-used headers.
2018-06-29 12:21:52 -04:00
Nick Mathewson
714788b195
Remove non-windows system includes from compat.h and util.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
71e56c70e9
Remove windows libraries from util.h and compat.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
31897a256c
Extract socks5_status_t
...
I'm not sure of the best place to put this header long-term, since
both or/*.c and tools/tor-resolve.c use it.
2018-06-29 12:21:52 -04:00
Nick Mathewson
080069c7b3
Move SIO_IDEAL_SEND_BACKLOG_QUERY into socket.h
2018-06-29 12:21:52 -04:00