Nick Mathewson
830492fbda
Merge branch 'bug11156_issue2_squashed'
2014-04-23 11:05:54 -04:00
George Kadianakis
bf7cb6acf6
Don't halt bootstrap to figure out if we should restart PT proxies.
...
Instead, figure out if we should restart PT proxies _immediately_ after
we re-read the config file.
2014-04-23 11:05:45 -04:00
Nick Mathewson
4367cbd71b
Merge remote-tracking branch 'public/sandbox_fixes_rebased_2'
2014-04-16 23:45:55 -04:00
Nick Mathewson
74ddd5f739
Merge remote-tracking branch 'andrea/bug11306'
2014-04-16 23:13:27 -04:00
Nick Mathewson
973661394a
Merge branch '10267_plus_10896_rebased_twice'
2014-04-16 23:03:41 -04:00
Nick Mathewson
89e520e2a7
Call pf-divert openbsd-specific, not no-linux
2014-04-16 23:03:25 -04:00
Nick Mathewson
db8259c230
Whitespace, doc fixes
2014-04-16 23:03:25 -04:00
dana koch
f680d0fdd2
Educate tor on OpenBSD's use of divert-to rules with the pf firewall.
...
This means that tor can run without needing to communicate with ioctls
to the firewall, and therefore doesn't need to run with privileges to
open the /dev/pf device node.
A new TransProxyType is added for this purpose, "pf-divert"; if the user
specifies this TransProxyType in their torrc, then the pf device node is
never opened and the connection destination is determined with getsockname
(as per pf(4)). The default behaviour (ie., when TransProxyType is "default"
when using the pf firewall) is still to assume that pf is configured with
rdr-to rules.
2014-04-16 23:03:25 -04:00
Nick Mathewson
3e4680f312
ipfw TransPort support on FreeBSD (10267)
...
This isn't on by default; to get it, you need to set "TransProxyType
ipfw". (The original patch had automatic detection for whether
/dev/pf is present and openable, but that seems marginally fragile.)
2014-04-16 23:03:25 -04:00
Nick Mathewson
2ae47d3c3a
Block certain option transitions while sandbox enabled
2014-04-16 22:03:18 -04:00
Nick Mathewson
c80a6bd9d5
Don't reload logs or rewrite pidfile while sandbox is active
2014-04-16 22:03:18 -04:00
Nick Mathewson
6194970765
Don't allow change to ConnLimit while sandbox is active
2014-04-16 22:03:18 -04:00
Nick Mathewson
156eefca45
Make sure everything using an interned string is preceded by a log
...
(It's nice to know what we were about to rename before we died from
renaming it.)
2014-04-16 22:03:09 -04:00
Nick Mathewson
cbfb8e703e
Add 'rename' to the sandboxed syscalls
...
(If we don't restrict rename, there's not much point in restricting
open, since an attacker could always use rename to make us open
whatever they want.)
2014-04-16 22:03:08 -04:00
Andrea Shepard
f36e93206a
Avoid redundant calls to connection_mark_for_close() on listeners when setting DisableNetwork to 1
2014-04-15 20:35:31 -07:00
dana koch
3ce3984772
Uplift status.c unit test coverage with new test cases and macros.
...
A new set of unit test cases are provided, as well as introducing
an alternative paradigm and macros to support it. Primarily, each test
case is given its own namespace, in order to isolate tests from each
other. We do this by in the usual fashion, by appending module and
submodule names to our symbols. New macros assist by reducing friction
for this and other tasks, like overriding a function in the global
namespace with one in the current namespace, or declaring integer
variables to assist tracking how many times a mock has been called.
A set of tests for a small-scale module has been included in this
commit, in order to highlight how the paradigm can be used. This
suite gives 100% coverage to status.c in test execution.
2014-04-15 15:00:34 -04:00
Nick Mathewson
2ff664ee20
Merge remote-tracking branch 'public/bug10801_024'
...
Conflicts:
src/common/address.c
src/or/config.c
2014-04-05 14:50:57 -04:00
Nick Mathewson
fc9e84062b
Merge remote-tracking branch 'public/bug4645'
...
Conflicts:
src/or/dirserv.c
2014-04-01 21:49:01 -04:00
Nick Mathewson
b4b91864bb
Merge remote-tracking branch 'public/bug9870'
...
Conflicts:
src/or/config.c
2014-04-01 20:48:15 -04:00
Nick Mathewson
c0441cca8b
Merge branch 'bug8787_squashed'
2014-03-31 11:57:56 -04:00
Andrea Shepard
abdf1878a3
Always check returns from unlink()
2014-03-31 11:27:08 -04:00
Nick Mathewson
9c0a1adfa2
Don't do a DNS lookup on a bridge line address
...
Fixes bug 10801; bugfix on 07bf274d
in 0.2.0.1-alpha.
2014-03-27 15:31:29 -04:00
Nick Mathewson
f4e2c72bee
Merge remote-tracking branch 'karsten/task-11070'
2014-03-23 00:18:48 -04:00
Andrea Shepard
3b31b45ddb
Appease make check-spaces
2014-03-18 10:26:44 -07:00
Karsten Loesing
7450403410
Take out remaining V1 directory code.
2014-03-18 10:40:10 +01:00
George Kadianakis
cc1bb19d56
Tone down the log message for when we don't need a PT proxy.
2014-03-10 22:05:31 +00:00
Nick Mathewson
0c04416c11
Merge branch 'bug11043_take2_squashed'
2014-03-10 14:08:29 -04:00
George Kadianakis
8c8e21e296
Improve the log message for when the Extended ORPort is not enabled.
2014-03-10 12:54:46 -04:00
Nick Mathewson
a50690e68f
Merge remote-tracking branch 'origin/maint-0.2.4'
2014-03-06 11:52:22 -05:00
Nick Mathewson
cbf9e74236
Correct the URL in the "a relay on win95???" message
...
This is a fix for 9393; it's not a bugfix on any Tor version per se,
but rather on whatever Tor version was current when we reorganized the
wiki.
2014-03-06 09:57:42 -05:00
Nick Mathewson
22ccfc6b5f
Rename PredictedCircsRelevanceTime->PredictedPortsRelevanceTime
...
All circuits are predictive; it's the ports that are expiring here.
2014-03-05 14:35:07 -05:00
Nick Mathewson
103cebd924
Merge branch 'ticket9176_squashed'
...
Conflicts:
doc/tor.1.txt
2014-03-05 14:32:05 -05:00
Nick Mathewson
2c25bb413e
Lower the maximum for PrecictedCircsRelevanceTime to one hour
2014-03-05 14:31:13 -05:00
unixninja92
4f03804b08
Fixed spacing.
2014-03-05 14:31:13 -05:00
unixninja92
5c310a4fa2
Added max value to PredictedCircsRelevanceTime.
2014-03-05 14:31:13 -05:00
unixninja92
898154f717
PredictedCircsRelevanceTime: limit how long we predict a port will be used
...
By default, after you've made a connection to port XYZ, we assume
you might still want to have an exit ready to connect to XYZ for one
hour. This patch lets you lower that interval.
Implements ticket 91
2014-03-05 14:29:54 -05:00
Nick Mathewson
ab225aaf28
Merge branch 'bug10169_025_v2'
...
Conflicts:
src/test/test.c
2014-03-04 11:03:30 -05:00
Nick Mathewson
043329eeb6
Merge remote-tracking branch 'karsten/task-5824'
2014-02-28 08:32:13 -05:00
Nick Mathewson
c4bb3c8d44
Log only one message for dangerous log settings.
...
We log only one message, containing a complete list of what's
wrong. We log the complete list whenever any of the possible things
that could have gotten wrong gets worse.
Fix for #9870 . Bugfix on 10480dff01
, which we merged in
0.2.5.1-alpha.
2014-02-12 15:32:50 -05:00
Nick Mathewson
87fb1e324c
Merge remote-tracking branch 'public/bug10169_024' into bug10169_025_v2
...
Conflicts:
src/or/circuitlist.c
2014-02-12 12:44:58 -05:00
Nick Mathewson
ce450bddb7
Remove TunnelDirConns and PreferTunnelledDirConns
...
These options were added back in 0.1.2.5-alpha, but no longer make any
sense now that all directories support tunneled connections and
BEGIN_DIR cells. These options were on by default; now they are
always-on.
This is a fix for 10849, where TunnelDirConns 0 would break hidden
services -- and that bug arrived, I think, in 0.2.0.10-alpha.
2014-02-11 11:10:55 -05:00
Nick Mathewson
c0483c7f85
Remove options for configuring HS authorities.
...
(There is no longer meaningfully any such thing as a HS authority,
since we stopped uploading or downloading v0 hs descriptors in
0.2.2.1-alpha.)
Implements #10881 , and part of #10841 .
2014-02-10 22:41:52 -05:00
Nick Mathewson
dafed84dab
Fixes for bug4645 fix.
2014-02-03 14:31:31 -05:00
rl1987
e82e772f2b
Using proper functions to create tor_addr_t.
2014-02-03 14:20:24 -05:00
rl1987
3a4b24c3ab
Removing is_internal_IP() function. Resolves ticket 4645.
2014-02-03 14:20:17 -05:00
Nick Mathewson
5991f9a156
TransProxyType replaces TransTPROXY option
...
I'm making this change now since ipfw will want its own option too,
and proliferating options here isn't sensible.
(See #10582 and #10267 )
2014-02-03 13:56:19 -05:00
Karsten Loesing
00ec6e6af0
More fixes to rip out all of the v2 directory code.
...
(This was a squash commit, but I forgot to squash it. Sorry! --Nick)
2014-02-03 13:34:30 -05:00
Nick Mathewson
c6c87fb6d1
Merge remote-tracking branch 'public/bug10758'
2014-02-03 11:05:29 -05:00
Nick Mathewson
fd8947afc2
Move the friendly warning about TPROXY and root to EPERM time
...
I'm doing this because:
* User doesn't mean you're running as root, and running as root
doesn't mean you've set User.
* It's possible that the user has done some other
capability-based hack to retain the necessary privileges.
2014-02-02 15:45:00 -05:00
Nick Mathewson
09ccc4c4a3
Add support for TPROXY via new TransTPRoxy option
...
Based on patch from "thomo" at #10582 .
2014-01-31 12:59:35 -05:00
Nick Mathewson
3193cbe2ba
Rip out all of the v2 directory code.
...
The remaining vestige is that we continue to publish the V2dir flag,
and that, for the controller, we continue to emit v2 directory
formats when requested.
2014-01-29 15:17:05 -05:00
Nick Mathewson
5c45a333c3
Merge remote-tracking branch 'public/bug10169_023' into bug10169_024
...
Conflicts:
doc/tor.1.txt
src/or/config.c
src/or/or.h
The conflicts were all pretty trivial.
2014-01-03 10:53:22 -05:00
Karsten Loesing
90f0358e3e
Disable (Cell,Entry,ExitPort)Statistics on bridges
...
In 0.2.3.8-alpha we attempted to "completely disable stats if we aren't
running as a relay", but instead disabled them only if we aren't running
as a server.
This commit leaves DirReqStatistics enabled on both relays and bridges,
and disables (Cell,Entry,ExitPort)Statistics on bridges.
2013-12-18 18:01:25 +01:00
Nick Mathewson
647248729f
Drop the MaxMemInQueues lower limit down to 256 MB.
...
on #9686 , gmorehose reports that the 500 MB lower limit is too high
for raspberry pi users.
2013-11-20 12:13:30 -05:00
Nick Mathewson
e572ec856d
Rename MaxMemInCellQueues to MaxMemInQueues
2013-11-20 12:12:23 -05:00
Nick Mathewson
fbc20294aa
Merge branch 'backtrace_squashed'
...
Conflicts:
src/common/sandbox.c
src/common/sandbox.h
src/common/util.c
src/or/main.c
src/test/include.am
src/test/test.c
2013-11-18 11:00:16 -05:00
Nick Mathewson
0cf234317f
Unit tests for new functions in log.c
2013-11-18 10:43:15 -05:00
Nick Mathewson
bd8ad674b9
Add a sighandler-safe logging mechanism
...
We had accidentially grown two fake ones: one for backtrace.c, and one
for sandbox.c. Let's do this properly instead.
Now, when we configure logs, we keep track of fds that should get told
about bad stuff happening from signal handlers. There's another entry
point for these that avoids using non-signal-handler-safe functions.
2013-11-18 10:43:15 -05:00
Nick Mathewson
063bea58bc
Basic backtrace ability
...
On platforms with the backtrace/backtrace_symbols_fd interface, Tor
can now dump stack traces on assertion failure. By default, I log
them to DataDir/stack_dump and to stderr.
2013-11-18 10:43:14 -05:00
Nick Mathewson
fc5a881bd3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-11-10 12:24:12 -05:00
Nick Mathewson
56ac75b265
Fix a wide line
2013-11-10 12:22:34 -05:00
Nick Mathewson
532f70a807
Change documentation DirServer->DirAuthority
...
We renamed the option, but we didn't actually fix it in the log
messages or the docs. This patch does that.
For #10124 . Patch by sqrt2.
2013-11-10 12:21:23 -05:00
rl1987
86cfc64d45
Implementing --allow-missing-torrc CLI option.
2013-11-07 14:26:05 -05:00
Nick Mathewson
12dc55f487
Merge branch 'prop221_squashed_024'
...
Conflicts:
src/or/or.h
2013-11-01 10:28:01 -04:00
Nick Mathewson
0de71bf8eb
Implement proposal 221: Stop sending CREATE_FAST
...
This makes FastFirstHopPK an AUTOBOOL; makes the default "auto"; and
makes the behavior of "auto" be "look at the consensus."
2013-11-01 10:04:48 -04:00
Nick Mathewson
83d9d72bf3
Merge remote-tracking branch 'karsten/morestats5'
2013-10-30 22:53:05 -04:00
Nick Mathewson
4b6f074df9
Merge remote-tracking branch 'public/bug5018'
...
Conflicts:
src/or/entrynodes.c
2013-10-29 01:29:59 -04:00
David Fifield
2235d65240
Document that unneeded transports are ignored.
...
Suggested by Roger in
https://trac.torproject.org/projects/tor/ticket/5018#comment:11 .
2013-10-29 01:06:03 -04:00
George Kadianakis
6f33dffec1
Only launch transport proxies that provide useful transports.
2013-10-29 01:05:56 -04:00
Karsten Loesing
2e0fad542c
Merge branch 'morestats4' into morestats5
...
Conflicts:
doc/tor.1.txt
src/or/config.c
src/or/connection.h
src/or/control.c
src/or/control.h
src/or/or.h
src/or/relay.c
src/or/relay.h
src/test/test.c
2013-10-28 12:09:42 +01:00
Nick Mathewson
f249074e41
Merge remote-tracking branch 'Ryman/bug5605'
2013-10-25 12:03:42 -04:00
Nick Mathewson
17d368281a
Merge remote-tracking branch 'linus/bug9206_option'
2013-10-16 11:20:43 -04:00
Nick Mathewson
7f2415683a
Merge remote-tracking branch 'asn/bug9651'
2013-10-14 11:43:33 -04:00
Linus Nordberg
fab8fd2c18
Add TestingDirAuthVoteGuard option for specifying relays to vote Guard on.
...
Addresses ticket 9206.
2013-10-07 13:33:42 +02:00
Roger Dingledine
a980d844cd
what is logging "above" notice?
2013-10-01 08:55:57 -04:00
George Kadianakis
43b9b51389
Warn when the Extended ORPort should be on but it's not.
2013-09-24 12:30:25 +01:00
Nick Mathewson
6178aaea06
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-09-20 11:01:10 -04:00
Nick Mathewson
f8b44eedf7
Get ready to stop sending timestamps in INTRODUCE cells
...
For now, round down to the nearest 10 minutes. Later, eliminate entirely by
setting a consensus parameter.
(This rounding is safe because, in 0.2.2, where the timestamp mattered,
REND_REPLAY_TIME_INTERVAL was a nice generous 60 minutes.)
2013-09-20 11:00:27 -04:00
Nick Mathewson
15b9a1ff10
Correctly re-process non-option cmdline args on sighup
...
Whenever we had an non-option commandline arguments *and*
option-bearing commandline arguments on the commandline, we would save
only the latter across invocations of options_init_from_torrc, but
take their existence as license not to re-parse the former. Yuck!
Incidentally, this fix lets us throw away the backup_arg[gv] logic.
Fix for bug 9746; bugfix on d98dfb3746
,
not in any released Tor. Found by Damian. Thanks, Damian!
2013-09-16 13:07:45 -04:00
Nick Mathewson
25a3ae922f
Merge remote-tracking branch 'Ryman/bug6384'
...
Conflicts:
src/or/config.c
src/or/main.c
2013-09-13 12:55:53 -04:00
Nick Mathewson
e35c972851
Merge branch 'bug4647_squashed'
2013-09-13 12:36:55 -04:00
Nick Mathewson
aac4f30d23
Add a --dump-config option to help testing option parsing.
2013-09-13 12:36:40 -04:00
Nick Mathewson
7972af7073
Whoops; make options_validate conform to validate_fn_t.
...
This just goes to show: never cast a function pointer. Found while
testing new command line parse logic.
Bugfix on 1293835440
, which implemented
6752: Not in any released tor.
2013-09-13 12:36:40 -04:00
Nick Mathewson
75d795b1d7
Disallow --hash-password with no commandline arguments.
...
Fixes bug 9573.
Bugfix on 59453ac6e
in 0.0.9pre5, which fixed a crash in a silly way.
2013-09-13 12:36:40 -04:00
Nick Mathewson
b523167f2f
Make config_parse_commandline table-driven for its list of cmdline args
2013-09-13 12:36:40 -04:00
Nick Mathewson
a1096fe180
Use commandline parser for other options
...
These were previously allowed only in the initial position:
--help, -h , --version, --digests, --list-torrc-options
2013-09-13 12:36:39 -04:00
Nick Mathewson
34ec954f8e
Expose commandline parser so that we can use it for --quiet,etc.
...
Fix for bug 9578.
2013-09-13 12:36:39 -04:00
Cristian Toader
d98dfb3746
Patch for 4647 (rewrite command line parser)
2013-09-13 12:36:26 -04:00
Nick Mathewson
e0b2cd061b
Merge remote-tracking branch 'ctoader/gsoc-cap-stage2'
...
Conflicts:
src/common/sandbox.c
2013-09-13 12:31:41 -04:00
Nick Mathewson
eb5f22eff2
Merge remote-tracking branch 'Ryman/bug4341'
2013-09-03 13:16:22 -04:00
Kevin Butler
db318dc77f
Minor changes to adhere to codebase conventions.
2013-09-03 17:47:03 +01:00
Kevin Butler
b336e8c74e
No longer writing control ports to file if updating reversible options fail. Fixes #5605 .
2013-09-02 19:25:08 +01:00
Kevin Butler
6e17fa6d7b
Added --library-versions flag to print the compile time and runtime versions of libevent, openssl and zlib. Partially implements #6384 .
2013-09-01 17:38:01 +01:00
Kevin Butler
bb69bf8882
Changed signature for check_nickname_list to remove warnings on free.
2013-08-31 05:14:48 +01:00
Kevin Butler
0513643317
MyFamily option will now fix fingerprints missing their leading instead of complaining. Should fix #4341 .
2013-08-31 04:49:04 +01:00
Nick Mathewson
2452302354
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-08-25 00:34:23 -04:00
Nick Mathewson
1ee1c8fb4f
Merge remote-tracking branch 'public/bug9366' into maint-0.2.4
2013-08-25 00:29:49 -04:00
Nick Mathewson
af7970b6bc
Add a 30-day maximum on user-supplied MaxCircuitDirtiness
...
Fix for bug 9543.
2013-08-21 11:35:00 -04:00
Cristian Toader
bc19ea100c
make check-spaces fixes
2013-08-21 17:57:15 +03:00
Nick Mathewson
74262f1571
Merge branch 'bug5040_4773_rebase_3'
2013-08-15 12:04:56 -04:00
George Kadianakis
33c3e60a37
Implement and use a generic auth. cookie initialization function.
...
Use the generic function for both the ControlPort cookie and the
ExtORPort cookie.
Also, place the global cookie variables in the heap so that we can
pass them around more easily as pointers.
Also also, fix the unit tests that broke by this change.
Conflicts:
src/or/config.h
src/or/ext_orport.c
2013-08-15 12:03:37 -04:00
George Kadianakis
13784d4753
Warn if the Extended ORPort listens on a public IP address.
2013-08-15 12:03:37 -04:00
Cristian Toader
8a85a48b9d
attempt to add stat64 filename filters; failed due to getaddrinfo..
2013-08-12 21:14:43 +03:00
Nick Mathewson
b9f9110ac7
Don't allow all ORPort values to be NoAdvertise
...
Fix for bug #9366
2013-08-05 12:14:48 -04:00
Nick Mathewson
83a859e24c
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-07-31 21:49:30 -04:00
Roger Dingledine
ff6bb13c02
NumDirectoryGuards now tracks NumEntryGuards by default
...
Now a user who changes only NumEntryGuards will get the behavior she
expects. Fixes bug 9354; bugfix on 0.2.4.8-alpha.
2013-07-30 12:05:39 -04:00
Nick Mathewson
e1d3b44495
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-07-18 23:17:57 -04:00
Nick Mathewson
17a960734a
Merge remote-tracking branch 'public/bug9295_023' into maint-0.2.4
2013-07-18 23:17:05 -04:00
Nick Mathewson
5977435629
tmp
2013-07-18 23:08:36 -04:00
George Kadianakis
c46f1b810d
More Extended ORPort code improvements.
...
* Change name of init_ext_or_auth_cookie_authentication().
* Add a small comment.
2013-07-18 14:59:56 -04:00
George Kadianakis
d8f74cc439
Move Extended ORPort code to its own module.
...
Move the code from the connection_or module to ext_orport.
This commit only moves code: it shouldn't modify anything.
2013-07-18 14:59:56 -04:00
George Kadianakis
2207525a69
Satisfy check-spaces.
2013-07-18 14:59:56 -04:00
George Kadianakis
d303228eca
Create the Extended ORPort authentication cookie file.
2013-07-18 14:59:55 -04:00
Nick Mathewson
8bf0382b22
Skeleton ExtORPort implementation. Needs testing, documentation.
...
Does not implement TransportControlPort yet.
2013-07-18 14:59:55 -04:00
Nick Mathewson
f45e1fbd5b
Start of a unit test for options_validate.
...
I added this so I could write a unit test for ServerTransportOptions,
but it incidentally exercises the succeed-on-defaults case of
options_validate too.
2013-07-18 14:40:12 -04:00
George Kadianakis
1ee3a0cf44
Place the options in the environment after processing them properly.
2013-07-18 08:45:03 -04:00
George Kadianakis
08d9807125
Write function that parses ServerTransportOptions torrc lines.
...
And use it to validate them.
2013-07-18 08:45:02 -04:00
Nick Mathewson
c0391bae75
Merge remote-tracking branch 'public/fancy_test_tricks'
...
Conflicts:
src/common/include.am
Conflict was from adding testsupport.h near where sandbox.h had
already been added.
2013-07-15 12:02:18 -04:00
Nick Mathewson
aac732322a
Merge remote-tracking branch 'public/gsoc-ctoader-cap-phase1-squashed'
2013-07-12 17:12:43 -04:00
Cristian Toader
f9c1ba6493
Add a basic seccomp2 syscall filter on Linux
...
It's controlled by the new Sandbox argument. Right now, it's rather
coarse-grained, it's Linux-only, and it may break some features.
2013-07-11 09:13:13 -04:00
Nick Mathewson
a3e0a87d95
Completely refactor how FILENAME_PRIVATE works
...
We previously used FILENAME_PRIVATE identifiers mostly for
identifiers exposed only to the unit tests... but also for
identifiers exposed to the benchmarker, and sometimes for
identifiers exposed to a similar module, and occasionally for no
really good reason at all.
Now, we use FILENAME_PRIVATE identifiers for identifiers shared by
Tor and the unit tests. They should be defined static when we
aren't building the unit test, and globally visible otherwise. (The
STATIC macro will keep us honest here.)
For identifiers used only by the unit tests and never by Tor at all,
on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS.
This is not the motivating use case for the split test/non-test
build system; it's just a test example to see how it works, and to
take a chance to clean up the code a little.
2013-07-10 15:20:10 -04:00
Nick Mathewson
cde1a2ca05
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-24 12:55:29 -04:00
Nick Mathewson
ca6aacce16
Fix bug 9122: don't allow newdefaultoptions to be NULL
...
(This caused a crash that was reported as bug 9122, but the underlying
behavior has been wrong for a while.)
Fix on 0.2.3.9-alpha.
2013-06-24 12:53:37 -04:00
Marek Majkowski
10480dff01
Fix #5584 - raise awareness of safer logging - warn about potentially unsafe config options
2013-06-24 11:22:34 -04:00
Nick Mathewson
b5d1fded3d
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-06-18 10:25:30 -04:00
Nick Mathewson
d3063da691
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/or/config.c
src/or/relay.c
2013-06-18 10:23:03 -04:00
Nick Mathewson
2e1fe1fcf9
Implement a real OOM-killer for too-long circuit queues.
...
This implements "algorithm 1" from my discussion of bug #9072 : on OOM,
find the circuits with the longest queues, and kill them. It's also a
fix for #9063 -- without the side-effects of bug #9072 .
The memory bounds aren't perfect here, and you need to be sure to
allow some slack for the rest of Tor's usage.
This isn't a perfect fix; the rest of the solutions I describe on
codeable.
2013-06-18 10:15:16 -04:00
Linus Nordberg
4d54b9774d
Add support for offsetting the voting interval in order to bootstrap faster.
...
A new option TestingV3AuthVotingStartOffset is added which offsets the
starting time of the voting interval. This is possible only when
TestingTorNetwork is set.
This patch makes run_scheduled_events() check for new consensus
downloads every second when TestingTorNetwork, instead of every
minute. This should be fine, see #8532 for reasoning.
This patch also brings MIN_VOTE_SECONDS and MIN_DIST_SECONDS down from
20 to 2 seconds, unconditionally. This makes sanity checking of
misconfiguration slightly less sane.
Addresses #8532 .
2013-06-08 15:25:32 +02:00
Nick Mathewson
97d1caadfd
Start correctly when not in testing mode.
...
You can't use != to compare arbitary members of or_options_t.
(Also, generate a better error message to say which Testing* option
was set.)
Fix for bug 8992. Bugfix on b0d4ca49
. Bug not in any released Tor.
2013-05-28 16:13:06 -04:00
Nick Mathewson
d3125a3e40
Merge remote-tracking branch 'karsten/task-6752-3'
2013-05-28 10:59:35 -04:00
Karsten Loesing
ef67077fba
Tweak TB_EMPTY event based on comments by nickm.
...
- Avoid control_event_refill_global function with 13 arguments and
increase code reuse factor by moving more code from control.c to
connection.c.
- Avoid an unsafe uint32_t -> int cast.
- Add TestingEnableTbEmptyEvent option.
- Prepare functions for testing.
- Rename a few functions and improve documentation.
2013-05-25 19:51:38 +02:00
Karsten Loesing
26b49f525d
Tweak CELL_STATS event based on comments by nickm.
...
- Move cell_command_to_string from control.c to command.c.
- Use accessor for global_circuitlist instead of extern.
- Add a struct for cell statistics by command instead of six arrays.
- Split up control_event_circuit_cell_stats by using two helper functions.
- Add TestingEnableCellStatsEvent option.
- Prepare functions for testing.
- Rename a few variables and document a few things better.
2013-05-25 19:51:38 +02:00
Karsten Loesing
2f893624ab
Tweak CONN_BW event based on comments by nickm.
...
- Rename read/write counters in connection_t to make it clear that these
are only used for CONN_BW events.
- Add TestingEnableConnBwEvent option.
2013-05-25 19:51:38 +02:00
Karsten Loesing
3795f6a78b
Try harder to document default_options correctly.
2013-05-25 07:33:37 +02:00
Peter Retzlaff
5b7eaa3765
Extract duplicate code in geoip and rephist.
...
Create new methods check_or_create_data_subdir() and
write_to_data_subdir() in config.c and use them throughout
rephist.c and geoip.c.
This should solve ticket #4282 .
2013-05-24 13:12:18 -04:00
Karsten Loesing
b0d4ca4990
Tweak #6752 patch based on comments by nickm.
2013-05-24 10:28:31 +02:00
Karsten Loesing
1293835440
Lower dir fetch retry schedules in testing networks.
...
Also lower maximum interval without directory requests, and raise
maximum download tries.
Implements #6752 .
2013-05-16 12:08:48 +02:00
Nick Mathewson
ef83db4fe8
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-24 22:16:07 -04:00
Nick Mathewson
f8bb0064d6
Merge remote-tracking branch 'public/bug6026' into maint-0.2.4
2013-04-24 22:15:47 -04:00
Nick Mathewson
0124b10d28
Turn on ntor by default client-side
...
Implements #8561 .
2013-04-18 22:35:15 -04:00
Nick Mathewson
ab3d5c0490
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-18 21:42:39 -04:00
Nick Mathewson
e35ca13528
Merge remote-tracking branch 'public/bug8716_023' into maint-0.2.4
2013-04-18 21:33:53 -04:00
Nick Mathewson
0a9c17a61a
Fix memory leak when sending configuration-changed event
...
Fix for bug #8718 ; bugfix on 0.2.3.3-alpha.
2013-04-17 11:34:15 -04:00
Nick Mathewson
3dfd1ebf12
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-04-11 01:40:31 -04:00
Nick Mathewson
7f50af116f
Merge remote-tracking branch 'public/bug8117_023' into maint-0.2.4
...
Conflicts:
doc/tor.1.txt
src/or/config.c
src/or/connection.c
2013-04-11 01:39:55 -04:00
Nick Mathewson
097a08f6fe
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-28 09:33:58 -04:00
Karsten Loesing
1bce70a9e3
Make PathsNeededToBuildCircuits option work.
2013-03-28 09:32:19 -04:00
Nick Mathewson
fa3c237739
Per-SOCKSPort configuration for bug 8117 fix.
...
This might be necessary if the bug8117 fix confuses any applications.
Also add a changes file.
2013-03-20 16:17:06 -04:00
Nick Mathewson
a87f22ef64
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-20 14:26:22 -04:00
Andrea Shepard
5c5198e713
Set default minimum bandwidth for exit flag to zero for TestingTorNetwork
2013-03-20 11:16:41 -07:00
Nick Mathewson
a660fe6fd5
Let testing networks override ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG
...
This adds a new option to fix bug 8508 which broke chutney
networks. The bug was introduced by 317d16de
.
2013-03-20 13:34:57 -04:00
Nick Mathewson
80c987fbb4
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-20 10:34:31 -04:00
Nick Mathewson
5b0b51ca3f
Merge remote-tracking branch 'public/bug6304_v3' into maint-0.2.4
...
Conflicts:
src/or/circuitbuild.c
src/or/config.c
2013-03-20 10:31:56 -04:00
Nick Mathewson
c547502ecb
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-03-19 16:15:39 -04:00
Nick Mathewson
6f20a74d52
Merge branch 'bug8240_v2_squashed' into maint-0.2.4
...
Conflicts:
doc/tor.1.txt
src/or/circuitbuild.c
src/or/config.c
src/or/or.h
2013-03-19 16:15:27 -04:00
Nick Mathewson
cf734a08f6
Add support for days of the week to intervals
2013-03-19 16:03:58 -04:00
Nick Mathewson
343f7aa059
Make the guard lifetime configurable and adjustable via the consensus
...
Fixes 8240.
(Don't actually increase the default guard lifetime. It seems likely to
break too many things if done precipitiously.)
2013-03-19 16:02:19 -04:00
Nick Mathewson
c101ecc8dc
Merge remote-tracking branch 'asn/bug3594_rebased_and_fixed'
...
Conflicts:
src/common/util.c
src/or/entrynodes.h
2013-03-19 13:25:45 -04:00
Nick Mathewson
597cd893c5
Merge remote-tracking branch 'public/bug6174' into maint-0.2.4
2013-03-18 16:36:25 -04:00
Nick Mathewson
5959d1c105
Merge remote-tracking branch 'andrea/bug8435' into maint-0.2.4
2013-03-18 15:17:11 -04:00
Andrea Shepard
f93f7e331b
Ignore advertised bandwidths if we have enough measured bandwidths available
2013-03-18 11:15:21 -07:00
Nick Mathewson
8b4728ebd6
Merge remote-tracking branch 'public/bug8180_023_v2' into maint-0.2.4
2013-03-15 12:38:11 -04:00
Nick Mathewson
686aaa5c4c
Upgrade the warn for EntryNodes without UseEntryGuards to an error
...
fixes bug 8180
2013-03-15 12:34:29 -04:00
Nick Mathewson
b9a8f8c17c
Fix the warning about LearnCircuitBuildTimeout && !CircuitBuildTimeout
...
This is for bug 6304.
Add a changes file too
2013-03-13 09:17:43 -04:00
Nick Mathewson
07e26005a6
Treat a changed IPv6 ORPort like an IPv4 one in retry_all_listeners()
...
Fix for bug 6026
2013-03-11 17:20:43 -04:00
Roger Dingledine
edd6f02273
randomize SSLKeyLifetime by default
...
resolves ticket 8443.
2013-03-10 23:38:18 -04:00
Roger Dingledine
599aeef9bc
parameterize SSLKeyLifetime
...
no actual changes in behavior yet
2013-03-10 23:38:18 -04:00
Roger Dingledine
f8960ea22b
set DisableV2DirectoryInfo_ off by default
...
since it's only enableable by authorities, nobody else would be able
to start their tor
2013-03-10 20:40:15 -04:00
Nick Mathewson
926b3d77f1
Tweak bug6783 patch.
2013-03-10 20:31:58 -04:00
Nick Mathewson
e4614d30e5
Add a DisableV2DirectoryInfo_ option to 404 all v2 ns requests
...
I have no idea whether b0rken clients will DoS the network if the v2
authorities all turn this on or not. It's experimental. See #6783 for
a description of how to test it more or less safely, and please be
careful!
2013-03-10 20:31:53 -04:00
Nick Mathewson
7bb51fdd89
Rename circuit_expire_all_dirty_circs
...
The new name is circuit_mark_all_dirty_circs_as_unusable.
This resolves an XXX024
2013-02-19 18:37:03 -05:00
Nick Mathewson
5fcc5dfa77
make check-spaces
2013-02-15 16:02:57 -05:00
Roger Dingledine
178599f026
get rid of the new caching notion in resolve_my_address()
...
and replace it with the good old-fashioned two functions approach
2013-02-12 04:25:42 -05:00
Roger Dingledine
cc896f7c84
Teach resolve_my_address() to return a cached answer
...
I didn't make any of the callers use this feature yet.
2013-02-11 17:09:10 -05:00
Nick Mathewson
5f29bc71b3
Merge remote-tracking branch 'public/bug7816_023'
2013-02-11 16:14:17 -05:00
Nick Mathewson
afca9ab14e
Fix another memory leak
...
This one occurs when changing configuration options. Found by
coverity.
2013-02-11 16:13:52 -05:00
Nick Mathewson
36e2eb6775
Avoid generating extra spaces when explaining how we guessed our address
2013-02-11 13:29:56 -05:00
Roger Dingledine
92ea0b86de
Refactor resolve_my_address() so logs are more accurate / helpful
...
It returns the method by which we decided our public IP address
(explicitly configured, resolved from explicit hostname, guessed from
interfaces, learned by gethostname).
Now we can provide more helpful log messages when a relay guesses its IP
address incorrectly (e.g. due to unexpected lines in /etc/hosts). Resolves
ticket 2267.
While we're at it, stop sending a stray "(null)" in some cases for the
server status "EXTERNAL_ADDRESS" controller event. Resolves bug 8200.
2013-02-11 13:29:56 -05:00
George Kadianakis
266f8cddd8
Refactoring to make parse_bridge_line() unittestable.
...
- Make parse_bridge_line() return a struct.
- Make bridge_add_from_config() accept a struct.
- Make string_is_key_value() less hysterical.
2013-02-11 18:07:26 +00:00
George Kadianakis
b5dceab175
Fix various issues pointed out by Nick and Andrea.
...
- Document the key=value format.
- Constify equal_sign_pos.
- Pass some strings that are about to be logged to escape().
- Update documentation and fix some bugs in tor_escape_str_for_socks_arg().
- Use string_is_key_value() in parse_bridge_line().
- Parenthesize a forgotten #define
- Add some more comments.
- Add some more unit test cases.
2013-02-09 18:46:10 +00:00
George Kadianakis
faf4f6c6d1
Validate SOCKS arguments.
2013-02-09 16:30:16 +00:00
George Kadianakis
757b03aacb
Add support for parsing SOCKS arguments.
2013-02-09 16:30:16 +00:00
Nick Mathewson
acb43c0735
Merge remote-tracking branch 'public/feature7706'
2013-02-01 17:24:08 -05:00
Mike Perry
95d272f5d8
Bounds-check path bias rate parameters.
...
The other remaining parameters don't really need range checks.
2013-02-01 17:01:22 -05:00
Mike Perry
dfcfb5d17d
Refactor the scaling parameter fetching into a single function.
...
Also, deprecate the torrc options for the scaling values. It's unlikely anyone
but developers will ever tweak them, even if we provided a single ratio value.
2013-02-01 17:01:12 -05:00
Nick Mathewson
a141430ec3
Rename log() to tor_log() for logging
...
This is meant to avoid conflict with the built-in log() function in
math.h. It resolves ticket 7599. First reported by dhill.
This was generated with the following perl script:
#!/usr/bin/perl -w -i -p
s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g;
s/\blog\(/tor_log\(/g;
2013-02-01 15:43:37 -05:00
Nick Mathewson
29136bd7e4
Merge branch 'bug5956_squashed'
2013-01-30 11:59:51 -05:00
Nick Mathewson
02c320916e
Parameterize FRAC_USABLE_NEEDED for fraction of circuits
...
Instead of hardcoding the minimum fraction of possible paths to 0.6, we
take it from the user, and failing that from the consensus, and
failing that we fall back to 0.6.
2013-01-30 11:58:17 -05:00
Andrea Shepard
123daffb60
Merge branch 'bug7802' of ssh://git-rw.torproject.org/mikeperry/tor
2013-01-28 16:16:45 -08:00
Andrea Shepard
dfbd19df41
Merge branch 'time_based_onionqueue_v2' of ssh://git-rw.torproject.org/nickm/tor
2013-01-24 08:10:12 -08:00
Mike Perry
e13e30221e
Implement Path use bias accounting.
...
Path use bias measures how often we can actually succeed using the circuits we
actually try to use. It is a subset of path bias accounting, but it is
computed as a separate statistic because the rate of client circuit use may
vary depending on use case.
2013-01-18 19:46:21 -08:00
Nick Mathewson
ff9bdbd56f
When excluding nodes by country, exclude {??} and {A1} too
...
This is ticket 7706, reported by "bugcatcher." The rationale here
is that if somebody says 'ExcludeNodes {tv}', then they probably
don't just want to block definitely Tuvaluan nodes: they also want
to block nodes that have unknown country, since for all they know
such nodes are also in Tuvalu.
This behavior is controlled by a new GeoIPExcludeUnknown autobool
option. With the default (auto) setting, we exclude ?? and A1 if
any country is excluded. If the option is 1, we add ?? and A1
unconditionally; if the option is 0, we never add them.
(Right now our geoip file doesn't actually seem to include A1: I'm
including it here in case it comes back.)
This feature only takes effect if you have a GeoIP file. Otherwise
you'd be excluding every node.
2013-01-17 18:07:36 -05:00
Nick Mathewson
4da083db3b
Update the copyright date to 201.
2013-01-16 01:54:56 -05:00
Nick Mathewson
b0b3c14c11
Eliminate MaxOnionsPending; replace it with MaxOnionQueueDelay
...
The right way to set "MaxOnionsPending" was to adjust it until the
processing delay was appropriate. So instead, let's measure how long
it takes to process onionskins (sampling them once we have a big
number), and then limit the queue based on its expected time to
finish.
This change is extra-necessary for ntor, since there is no longer a
reasonable way to set MaxOnionsPending without knowing what mix of
onionskins you'll get.
This patch also reserves 1/3 of the onionskin spots for ntor
handshakes, on the theory that TAP handshakes shouldn't be allowed to
starve their speedier cousins. We can change this later if need be.
Resolves 7291.
2013-01-03 13:03:41 -05:00
Nick Mathewson
b1bdecd703
Merge branch 'ntor-resquashed'
...
Conflicts:
src/or/cpuworker.c
src/or/or.h
src/test/bench.c
2013-01-03 11:52:41 -05:00
Nick Mathewson
b286373908
Enable the ntor handshake on the client side.
...
"works for me"
2013-01-03 11:29:47 -05:00
Nick Mathewson
ee4182612f
Avoid spurious local-port warnings
...
Our old warn_nonlocal_client_ports() would give a bogus warning for
every nonlocal port every time it parsed any ports at all. So if it
parsed a nonlocal socksport, it would complain that it had a nonlocal
socksport...and then turn around and complain about the nonlocal
socksport again, calling it a nonlocal transport or nonlocal dnsport,
if it had any of those.
Fixes bug 7836; bugfix on 0.2.3.3-alpha.
2013-01-02 10:37:03 -05:00
Nick Mathewson
885e8d35c7
Merge remote-tracking branch 'mikeperry/209-path-bias-changes'
2012-12-25 23:30:28 -05:00
Nick Mathewson
0f9dfef9d6
Add configuration options for directory guards
...
In addition to all the other ways to make directory gurads not go,
you can now set UseEntryGuardsAsDirGuards to 0.
2012-12-25 23:14:43 -05:00
Nick Mathewson
25afecdbf9
Make ECDHE group configurable: 224 for public, 256 for bridges (default)
2012-12-25 20:22:46 -05:00
Mike Perry
b0fc18c37e
Changes from Nick's code review 'part 1'
...
I think this is actually his third code review of this branch so far.
2012-12-18 13:26:36 -08:00
Nick Mathewson
8d080d0b01
Per-listener option to prefer IPv6 automaps when possible.
2012-12-17 14:51:30 -05:00
Nick Mathewson
de4cc126cb
Build and test most of the machinery needed for IPv6 virtualaddrmaps
...
With an IPv6 virtual address map, we can basically hand out a new
IPv6 address for _every_ address we connect to. That'll be cool, and
will let us maybe get around prop205 issues.
This uses some fancy logic to try to make the code paths in the ipv4
and the ipv6 case as close as possible, and moves to randomly
generated addresses so we don't need to maintain those stupid counters
that will collide if Tor restarts but apps don't.
Also has some XXXX items to fix to make this useful. More design
needed.
2012-12-17 14:51:29 -05:00
Nick Mathewson
ac990aa44a
Turn off by-default use of client-side DNS cacheing.
2012-12-17 14:50:04 -05:00
Nick Mathewson
7315a67646
Refactor port_cfg_t creation into a port_cfg_new() function
...
This function gives us a single place to set reasonable default flags
for port_cfg_t entries, to avoid bugs like the one where we weren't
setting ipv4_traffic_ok to 1 on SocksPorts initialized in an older
way.
2012-12-17 14:50:03 -05:00
Nick Mathewson
d3e9e03cac
Add options to turn DNS cache use on or off per client port.
...
(This is part 1 of making DNS cache use enabled/disabled on a
per-client port basis. These options are shuffled around correctly,
but don't do anything yet.)
2012-12-17 14:48:08 -05:00
Nick Mathewson
44a9a47706
Oops; make DNSPort configuration take address family options
2012-12-17 14:48:08 -05:00
Nick Mathewson
6a468a1722
Fix two wide lines in config.c
2012-12-13 12:44:17 -05:00
Mike Perry
412ae099cb
Prop 209: Add path bias counts for timeouts and other mechanisms.
...
Turns out there's more than one way to block a tagged circuit.
This seems to successfully handle all of the normal exit circuits. Hidden
services need additional tweaks, still.
2012-12-07 15:28:38 -08:00
Mike Perry
bb548134cd
Update with code review changes from Nick.
2012-12-07 15:28:37 -08:00
Mike Perry
248fbc3619
Update pathbias parameters to match Proposal 209.
...
Needs manpage update and testing still..
2012-12-07 15:28:37 -08:00
Nick Mathewson
f742b33d85
Drop FallbackNetworkstatusFile; it never worked.
2012-12-06 11:28:49 -05:00
Nick Mathewson
a8d491a8fd
Add an option to weight down authorities when choosing a fallback
2012-12-06 11:28:49 -05:00
Nick Mathewson
06cd62266f
Add a way to configure selection weights for dir_server_t
2012-12-06 11:28:49 -05:00
Nick Mathewson
90f6071d8d
New FallbackDir option to add extra directories for bootstraping
...
This replaces the old FallbackConsensus notion, and should provide a
way -- assuming we pick reasonable nodes! -- to give clients
suggestions of placs to go to get their first consensus.
2012-12-06 11:28:49 -05:00
Nick Mathewson
46a62e3256
Refactor add_trusted_dir_server
...
Now creating a dir_server_t and adding it are separate functions, and
there are frontend functions for adding a trusted dirserver and a
fallback dirserver.
2012-12-06 11:28:48 -05:00
Nick Mathewson
ded70363a7
Rename DirServer to DirAuthority
2012-12-06 11:23:43 -05:00
Nick Mathewson
5c51b3f1f0
Start refactoring trusted_dir_servers into trusted and fallback lists
...
We use trusted_dir_server_t for two pieces of functionality: a list of
all directory authorities, and a list of initial places to look for
a directory. With this patch we start to separate those two roles.
There is as of now no actual way to be a fallback directory without being
an authority.
2012-12-06 11:23:43 -05:00
Nick Mathewson
190c1d4981
Merge branch 'bug7013_take2_squashed'
2012-11-27 22:18:16 -05:00
George Kadianakis
6f21d2e496
Introduce tor_addr_port_parse() and use it to parse ServerTransportListenAddr.
2012-11-27 22:18:08 -05:00
George Kadianakis
f88c303869
Add a torrc option to specify the bind address of managed proxies.
2012-11-27 22:18:08 -05:00
Nick Mathewson
ecb619d96b
Give useful warning when both IPv4 and IPv6 are disabled on a socksport
2012-11-15 22:58:54 -05:00
Nick Mathewson
28cbe90839
Allow IPv4 traffic on default and old-style-config SocksPorts.
...
Looks like when i was writing the code to set the ipv4_traffic flag on
port_cfg_t, I missed some cases, such as the one where the port was
set from its default value.
Fix for 7493. Bug not in any released Tor.
2012-11-15 22:49:43 -05:00
Nick Mathewson
363cf02455
Implement a PreferIPv6 flag for SocksPorts
2012-11-14 23:16:40 -05:00
Nick Mathewson
25cf286fb1
Whitespace cleanup
2012-11-14 23:16:24 -05:00
Nick Mathewson
111321ed16
Rename ipv{4,6}_only to bind_ipv{4,6}_only
...
This is to avoid confusion with the ipv{4,6}_traffic flags.
2012-11-14 23:16:23 -05:00
Nick Mathewson
4bec25c3cd
Add {No,}IPv{4,6}Traffic options to SOCKSPort
...
These options are for telling the SOCKSPort that it should allow or
not allow connections to IPv4/IPv6 addresses.
These aren't implemented yet; this is just the code to read the
options and get them into the entrey_connection_t.
2012-11-14 23:16:23 -05:00
Nick Mathewson
9016d9e829
Add an IPv6Exit configuration option
...
Don't advertise an IPv6 exit policy, or accept IPv6 exit requests,
if IPv6Exit is not true.
2012-11-14 23:16:22 -05:00
Nick Mathewson
2eb7eafc9d
Add a new family-specific syntax for tor_addr_parse_mask_ports
...
By default, "*" means "All IPv4 addresses" with
tor_addr_parse_mask_ports, so I won't break anything. But if the new
EXTENDED_STAR flag is provided, then * means "any address", *4 means
"any IPv4 address" (that is, 0.0.0.0/0), and "*6" means "any IPv6
address" (that is, [::]/0).
This is going to let us have a syntax for specifying exit policies in
torrc that won't drive people mad.
Also, add a bunch of unit tests for tor_addr_parse_mask_ports to test
these new features, and to increase coverage.
2012-11-14 23:16:21 -05:00
Nick Mathewson
7908ab2093
Move address map into its own file.
2012-11-14 23:16:20 -05:00
Nick Mathewson
11c467f643
Fix a stupid logic-error in warnings about low ports.
...
Instead of warning about low ports that are advertised, we should have
been warning about low ports that we're listening on. Bug 7285, fix
on 0.2.3.9-alpha.
2012-11-06 17:15:39 -05:00
Nick Mathewson
2b781613b0
Whitespace fixes
2012-11-04 21:52:28 -05:00
Nick Mathewson
98204729aa
Clean up nonsensical calling convention for config_load_geoip_file_
...
(How many "load a file" functions do you typically see where the
function frees the filename argument?)
2012-11-04 21:51:02 -05:00
Nick Mathewson
626a8b60d7
Merge remote-tracking branch 'linus/bug5053-bug5055'
...
Conflicts:
src/or/geoip.c
2012-11-04 21:44:31 -05:00
Nick Mathewson
fa6a65756f
Kill extraneous x from 907db008ab
...
Looks like clang doesn't complain about this kind of thing.
Spotted by Andrea. Bug not in any released version.
2012-10-22 14:29:15 -04:00
Linus Nordberg
9d71d97e9d
Document two functions.
2012-10-22 12:24:29 +02:00
Linus Nordberg
af175fa7e4
Duplicate less code.
2012-10-20 20:56:59 +02:00
Linus Nordberg
817ff962f8
Separate IPv4 and IPv6 geoip file loading.
...
Also add IPv6 geoip file digest to extra info.
Also also, add support for IPv6 addresses in control command
"ip-to-country".
2012-10-20 20:56:59 +02:00
Linus Nordberg
e2313d8622
White space.
2012-10-17 14:01:02 +02:00
Karsten Loesing
c03e3d66a9
Minor tweaks and comments to nils' geoip v6 code.
2012-10-17 10:54:52 +02:00
nils
abb886014e
Add GeoIP database for IPv6 addresses
2012-10-17 10:54:52 +02:00
Nick Mathewson
907db008ab
Move the circuit build timeout code into its own file.
2012-10-15 14:50:55 -04:00
Nick Mathewson
9f83142591
Merge remote-tracking branch 'public/bug1031'
2012-10-15 11:20:48 -04:00
Nick Mathewson
0d946e1773
Merge remote-tracking branch 'arma/bug7029'
2012-10-14 23:06:43 -04:00
Nick Mathewson
56c0baa523
Rename all reserved C identifiers we defined
...
For everything we declare that starts with _, make it end with _ instead.
This is a machine-generated patch. To make it, start by getting the
list of reserved identifiers using:
git ls-tree -r --name-only HEAD | grep '\.[ch]$' | \
xargs ctags --c-kinds=defglmpstuvx -o - | grep '^_' | \
cut -f 1 | sort| uniq
You might need gnu ctags.
Then pipe the output through this script:
==============================
use strict;
BEGIN { print "#!/usr/bin/perl -w -i -p\n\n"; }
chomp;
next if (
/^__attribute__/ or
/^__func__/ or
/^_FILE_OFFSET_BITS/ or
/^_FORTIFY_SOURCE/ or
/^_GNU_SOURCE/ or
/^_WIN32/ or
/^_DARWIN_UNLIMITED/ or
/^_FILE_OFFSET_BITS/ or
/^_LARGEFILE64_SOURCE/ or
/^_LFS64_LARGEFILE/ or
/^__cdecl/ or
/^__attribute__/ or
/^__func__/ or
/^_WIN32_WINNT/);
my $ident = $_;
my $better = $ident;
$better =~ s/^_//;
$better = "${better}_";
print "s/(?<![A-Za-z0-9_])$ident(?![A-Za-z0-9_])/$better/g;\n";
==============================
Then run the resulting script on all the files you want to change.
(That is, all the C except that in src/ext.) The resulting script was:
==============================
s/(?<![A-Za-z0-9_])_address(?![A-Za-z0-9_])/address_/g;
s/(?<![A-Za-z0-9_])_aes_fill_buf(?![A-Za-z0-9_])/aes_fill_buf_/g;
s/(?<![A-Za-z0-9_])_AllowInvalid(?![A-Za-z0-9_])/AllowInvalid_/g;
s/(?<![A-Za-z0-9_])_AP_CONN_STATE_MAX(?![A-Za-z0-9_])/AP_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_AP_CONN_STATE_MIN(?![A-Za-z0-9_])/AP_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_assert_cache_ok(?![A-Za-z0-9_])/assert_cache_ok_/g;
s/(?<![A-Za-z0-9_])_A_UNKNOWN(?![A-Za-z0-9_])/A_UNKNOWN_/g;
s/(?<![A-Za-z0-9_])_base(?![A-Za-z0-9_])/base_/g;
s/(?<![A-Za-z0-9_])_BridgePassword_AuthDigest(?![A-Za-z0-9_])/BridgePassword_AuthDigest_/g;
s/(?<![A-Za-z0-9_])_buffer_stats_compare_entries(?![A-Za-z0-9_])/buffer_stats_compare_entries_/g;
s/(?<![A-Za-z0-9_])_chan_circid_entries_eq(?![A-Za-z0-9_])/chan_circid_entries_eq_/g;
s/(?<![A-Za-z0-9_])_chan_circid_entry_hash(?![A-Za-z0-9_])/chan_circid_entry_hash_/g;
s/(?<![A-Za-z0-9_])_check_no_tls_errors(?![A-Za-z0-9_])/check_no_tls_errors_/g;
s/(?<![A-Za-z0-9_])_c_hist_compare(?![A-Za-z0-9_])/c_hist_compare_/g;
s/(?<![A-Za-z0-9_])_circ(?![A-Za-z0-9_])/circ_/g;
s/(?<![A-Za-z0-9_])_circuit_get_global_list(?![A-Za-z0-9_])/circuit_get_global_list_/g;
s/(?<![A-Za-z0-9_])_circuit_mark_for_close(?![A-Za-z0-9_])/circuit_mark_for_close_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_C_MAX(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_C_MAX_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_MAX(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_MAX_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_MIN(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_MIN_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_OR_MAX(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_OR_MAX_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_OR_MIN(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_OR_MIN_/g;
s/(?<![A-Za-z0-9_])_cmp_int_strings(?![A-Za-z0-9_])/cmp_int_strings_/g;
s/(?<![A-Za-z0-9_])_compare_cached_resolves_by_expiry(?![A-Za-z0-9_])/compare_cached_resolves_by_expiry_/g;
s/(?<![A-Za-z0-9_])_compare_digests(?![A-Za-z0-9_])/compare_digests_/g;
s/(?<![A-Za-z0-9_])_compare_digests256(?![A-Za-z0-9_])/compare_digests256_/g;
s/(?<![A-Za-z0-9_])_compare_dir_src_ents_by_authority_id(?![A-Za-z0-9_])/compare_dir_src_ents_by_authority_id_/g;
s/(?<![A-Za-z0-9_])_compare_duration_idx(?![A-Za-z0-9_])/compare_duration_idx_/g;
s/(?<![A-Za-z0-9_])_compare_int(?![A-Za-z0-9_])/compare_int_/g;
s/(?<![A-Za-z0-9_])_compare_networkstatus_v2_published_on(?![A-Za-z0-9_])/compare_networkstatus_v2_published_on_/g;
s/(?<![A-Za-z0-9_])_compare_old_routers_by_identity(?![A-Za-z0-9_])/compare_old_routers_by_identity_/g;
s/(?<![A-Za-z0-9_])_compare_orports(?![A-Za-z0-9_])/compare_orports_/g;
s/(?<![A-Za-z0-9_])_compare_pairs(?![A-Za-z0-9_])/compare_pairs_/g;
s/(?<![A-Za-z0-9_])_compare_routerinfo_by_id_digest(?![A-Za-z0-9_])/compare_routerinfo_by_id_digest_/g;
s/(?<![A-Za-z0-9_])_compare_routerinfo_by_ip_and_bw(?![A-Za-z0-9_])/compare_routerinfo_by_ip_and_bw_/g;
s/(?<![A-Za-z0-9_])_compare_signed_descriptors_by_age(?![A-Za-z0-9_])/compare_signed_descriptors_by_age_/g;
s/(?<![A-Za-z0-9_])_compare_string_ptrs(?![A-Za-z0-9_])/compare_string_ptrs_/g;
s/(?<![A-Za-z0-9_])_compare_strings_for_pqueue(?![A-Za-z0-9_])/compare_strings_for_pqueue_/g;
s/(?<![A-Za-z0-9_])_compare_strs(?![A-Za-z0-9_])/compare_strs_/g;
s/(?<![A-Za-z0-9_])_compare_tor_version_str_ptr(?![A-Za-z0-9_])/compare_tor_version_str_ptr_/g;
s/(?<![A-Za-z0-9_])_compare_vote_rs(?![A-Za-z0-9_])/compare_vote_rs_/g;
s/(?<![A-Za-z0-9_])_compare_votes_by_authority_id(?![A-Za-z0-9_])/compare_votes_by_authority_id_/g;
s/(?<![A-Za-z0-9_])_compare_without_first_ch(?![A-Za-z0-9_])/compare_without_first_ch_/g;
s/(?<![A-Za-z0-9_])_connection_free(?![A-Za-z0-9_])/connection_free_/g;
s/(?<![A-Za-z0-9_])_connection_mark_and_flush(?![A-Za-z0-9_])/connection_mark_and_flush_/g;
s/(?<![A-Za-z0-9_])_connection_mark_for_close(?![A-Za-z0-9_])/connection_mark_for_close_/g;
s/(?<![A-Za-z0-9_])_connection_mark_unattached_ap(?![A-Za-z0-9_])/connection_mark_unattached_ap_/g;
s/(?<![A-Za-z0-9_])_connection_write_to_buf_impl(?![A-Za-z0-9_])/connection_write_to_buf_impl_/g;
s/(?<![A-Za-z0-9_])_ConnLimit(?![A-Za-z0-9_])/ConnLimit_/g;
s/(?<![A-Za-z0-9_])_CONN_TYPE_MAX(?![A-Za-z0-9_])/CONN_TYPE_MAX_/g;
s/(?<![A-Za-z0-9_])_CONN_TYPE_MIN(?![A-Za-z0-9_])/CONN_TYPE_MIN_/g;
s/(?<![A-Za-z0-9_])_CONTROL_CONN_STATE_MAX(?![A-Za-z0-9_])/CONTROL_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_CONTROL_CONN_STATE_MIN(?![A-Za-z0-9_])/CONTROL_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_CPUWORKER_STATE_MAX(?![A-Za-z0-9_])/CPUWORKER_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_CPUWORKER_STATE_MIN(?![A-Za-z0-9_])/CPUWORKER_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_crypto_dh_get_dh(?![A-Za-z0-9_])/crypto_dh_get_dh_/g;
s/(?<![A-Za-z0-9_])_crypto_global_initialized(?![A-Za-z0-9_])/crypto_global_initialized_/g;
s/(?<![A-Za-z0-9_])_crypto_new_pk_from_rsa(?![A-Za-z0-9_])/crypto_new_pk_from_rsa_/g;
s/(?<![A-Za-z0-9_])_crypto_pk_get_evp_pkey(?![A-Za-z0-9_])/crypto_pk_get_evp_pkey_/g;
s/(?<![A-Za-z0-9_])_crypto_pk_get_rsa(?![A-Za-z0-9_])/crypto_pk_get_rsa_/g;
s/(?<![A-Za-z0-9_])_DIR_CONN_STATE_MAX(?![A-Za-z0-9_])/DIR_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_DIR_CONN_STATE_MIN(?![A-Za-z0-9_])/DIR_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_DIR_PURPOSE_MAX(?![A-Za-z0-9_])/DIR_PURPOSE_MAX_/g;
s/(?<![A-Za-z0-9_])_DIR_PURPOSE_MIN(?![A-Za-z0-9_])/DIR_PURPOSE_MIN_/g;
s/(?<![A-Za-z0-9_])_dirreq_map_get(?![A-Za-z0-9_])/dirreq_map_get_/g;
s/(?<![A-Za-z0-9_])_dirreq_map_put(?![A-Za-z0-9_])/dirreq_map_put_/g;
s/(?<![A-Za-z0-9_])_dns_randfn(?![A-Za-z0-9_])/dns_randfn_/g;
s/(?<![A-Za-z0-9_])_dummy(?![A-Za-z0-9_])/dummy_/g;
s/(?<![A-Za-z0-9_])_edge(?![A-Za-z0-9_])/edge_/g;
s/(?<![A-Za-z0-9_])_END_CIRC_REASON_MAX(?![A-Za-z0-9_])/END_CIRC_REASON_MAX_/g;
s/(?<![A-Za-z0-9_])_END_CIRC_REASON_MIN(?![A-Za-z0-9_])/END_CIRC_REASON_MIN_/g;
s/(?<![A-Za-z0-9_])_EOF(?![A-Za-z0-9_])/EOF_/g;
s/(?<![A-Za-z0-9_])_ERR(?![A-Za-z0-9_])/ERR_/g;
s/(?<![A-Za-z0-9_])_escaped_val(?![A-Za-z0-9_])/escaped_val_/g;
s/(?<![A-Za-z0-9_])_evdns_log(?![A-Za-z0-9_])/evdns_log_/g;
s/(?<![A-Za-z0-9_])_evdns_nameserver_add_impl(?![A-Za-z0-9_])/evdns_nameserver_add_impl_/g;
s/(?<![A-Za-z0-9_])_EVENT_MAX(?![A-Za-z0-9_])/EVENT_MAX_/g;
s/(?<![A-Za-z0-9_])_EVENT_MIN(?![A-Za-z0-9_])/EVENT_MIN_/g;
s/(?<![A-Za-z0-9_])_ExcludeExitNodesUnion(?![A-Za-z0-9_])/ExcludeExitNodesUnion_/g;
s/(?<![A-Za-z0-9_])_EXIT_CONN_STATE_MAX(?![A-Za-z0-9_])/EXIT_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_EXIT_CONN_STATE_MIN(?![A-Za-z0-9_])/EXIT_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_EXIT_PURPOSE_MAX(?![A-Za-z0-9_])/EXIT_PURPOSE_MAX_/g;
s/(?<![A-Za-z0-9_])_EXIT_PURPOSE_MIN(?![A-Za-z0-9_])/EXIT_PURPOSE_MIN_/g;
s/(?<![A-Za-z0-9_])_extrainfo_free(?![A-Za-z0-9_])/extrainfo_free_/g;
s/(?<![A-Za-z0-9_])_find_by_keyword(?![A-Za-z0-9_])/find_by_keyword_/g;
s/(?<![A-Za-z0-9_])_free_cached_dir(?![A-Za-z0-9_])/free_cached_dir_/g;
s/(?<![A-Za-z0-9_])_free_cached_resolve(?![A-Za-z0-9_])/free_cached_resolve_/g;
s/(?<![A-Za-z0-9_])_free_duplicate_routerstatus_entry(?![A-Za-z0-9_])/free_duplicate_routerstatus_entry_/g;
s/(?<![A-Za-z0-9_])_free_link_history(?![A-Za-z0-9_])/free_link_history_/g;
s/(?<![A-Za-z0-9_])_geoip_compare_entries(?![A-Za-z0-9_])/geoip_compare_entries_/g;
s/(?<![A-Za-z0-9_])_geoip_compare_key_to_entry(?![A-Za-z0-9_])/geoip_compare_key_to_entry_/g;
s/(?<![A-Za-z0-9_])_hex_decode_digit(?![A-Za-z0-9_])/hex_decode_digit_/g;
s/(?<![A-Za-z0-9_])_idxplus1(?![A-Za-z0-9_])/idxplus1_/g;
s/(?<![A-Za-z0-9_])__libc_enable_secure(?![A-Za-z0-9_])/_libc_enable_secure_/g;
s/(?<![A-Za-z0-9_])_log_debug(?![A-Za-z0-9_])/log_debug_/g;
s/(?<![A-Za-z0-9_])_log_err(?![A-Za-z0-9_])/log_err_/g;
s/(?<![A-Za-z0-9_])_log_fn(?![A-Za-z0-9_])/log_fn_/g;
s/(?<![A-Za-z0-9_])_log_fn_function_name(?![A-Za-z0-9_])/log_fn_function_name_/g;
s/(?<![A-Za-z0-9_])_log_global_min_severity(?![A-Za-z0-9_])/log_global_min_severity_/g;
s/(?<![A-Za-z0-9_])_log_info(?![A-Za-z0-9_])/log_info_/g;
s/(?<![A-Za-z0-9_])_log_notice(?![A-Za-z0-9_])/log_notice_/g;
s/(?<![A-Za-z0-9_])_log_prefix(?![A-Za-z0-9_])/log_prefix_/g;
s/(?<![A-Za-z0-9_])_log_warn(?![A-Za-z0-9_])/log_warn_/g;
s/(?<![A-Za-z0-9_])_magic(?![A-Za-z0-9_])/magic_/g;
s/(?<![A-Za-z0-9_])_MALLOC_LOCK(?![A-Za-z0-9_])/MALLOC_LOCK_/g;
s/(?<![A-Za-z0-9_])_MALLOC_LOCK_INIT(?![A-Za-z0-9_])/MALLOC_LOCK_INIT_/g;
s/(?<![A-Za-z0-9_])_MALLOC_UNLOCK(?![A-Za-z0-9_])/MALLOC_UNLOCK_/g;
s/(?<![A-Za-z0-9_])_microdesc_eq(?![A-Za-z0-9_])/microdesc_eq_/g;
s/(?<![A-Za-z0-9_])_microdesc_hash(?![A-Za-z0-9_])/microdesc_hash_/g;
s/(?<![A-Za-z0-9_])_MIN_TOR_TLS_ERROR_VAL(?![A-Za-z0-9_])/MIN_TOR_TLS_ERROR_VAL_/g;
s/(?<![A-Za-z0-9_])_mm_free(?![A-Za-z0-9_])/mm_free_/g;
s/(?<![A-Za-z0-9_])_NIL(?![A-Za-z0-9_])/NIL_/g;
s/(?<![A-Za-z0-9_])_n_openssl_mutexes(?![A-Za-z0-9_])/n_openssl_mutexes_/g;
s/(?<![A-Za-z0-9_])_openssl_dynlock_create_cb(?![A-Za-z0-9_])/openssl_dynlock_create_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_dynlock_destroy_cb(?![A-Za-z0-9_])/openssl_dynlock_destroy_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_dynlock_lock_cb(?![A-Za-z0-9_])/openssl_dynlock_lock_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_locking_cb(?![A-Za-z0-9_])/openssl_locking_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_mutexes(?![A-Za-z0-9_])/openssl_mutexes_/g;
s/(?<![A-Za-z0-9_])_option_abbrevs(?![A-Za-z0-9_])/option_abbrevs_/g;
s/(?<![A-Za-z0-9_])_option_vars(?![A-Za-z0-9_])/option_vars_/g;
s/(?<![A-Za-z0-9_])_OR_CONN_STATE_MAX(?![A-Za-z0-9_])/OR_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_OR_CONN_STATE_MIN(?![A-Za-z0-9_])/OR_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_OutboundBindAddressIPv4(?![A-Za-z0-9_])/OutboundBindAddressIPv4_/g;
s/(?<![A-Za-z0-9_])_OutboundBindAddressIPv6(?![A-Za-z0-9_])/OutboundBindAddressIPv6_/g;
s/(?<![A-Za-z0-9_])_PDS_PREFER_TUNNELED_DIR_CONNS(?![A-Za-z0-9_])/PDS_PREFER_TUNNELED_DIR_CONNS_/g;
s/(?<![A-Za-z0-9_])_port(?![A-Za-z0-9_])/port_/g;
s/(?<![A-Za-z0-9_])__progname(?![A-Za-z0-9_])/_progname_/g;
s/(?<![A-Za-z0-9_])_PublishServerDescriptor(?![A-Za-z0-9_])/PublishServerDescriptor_/g;
s/(?<![A-Za-z0-9_])_remove_old_client_helper(?![A-Za-z0-9_])/remove_old_client_helper_/g;
s/(?<![A-Za-z0-9_])_rend_cache_entry_free(?![A-Za-z0-9_])/rend_cache_entry_free_/g;
s/(?<![A-Za-z0-9_])_routerlist_find_elt(?![A-Za-z0-9_])/routerlist_find_elt_/g;
s/(?<![A-Za-z0-9_])_SafeLogging(?![A-Za-z0-9_])/SafeLogging_/g;
s/(?<![A-Za-z0-9_])_SHORT_FILE_(?![A-Za-z0-9_])/SHORT_FILE__/g;
s/(?<![A-Za-z0-9_])_state_abbrevs(?![A-Za-z0-9_])/state_abbrevs_/g;
s/(?<![A-Za-z0-9_])_state_vars(?![A-Za-z0-9_])/state_vars_/g;
s/(?<![A-Za-z0-9_])_t(?![A-Za-z0-9_])/t_/g;
s/(?<![A-Za-z0-9_])_t32(?![A-Za-z0-9_])/t32_/g;
s/(?<![A-Za-z0-9_])_test_op_ip6(?![A-Za-z0-9_])/test_op_ip6_/g;
s/(?<![A-Za-z0-9_])_thread1_name(?![A-Za-z0-9_])/thread1_name_/g;
s/(?<![A-Za-z0-9_])_thread2_name(?![A-Za-z0-9_])/thread2_name_/g;
s/(?<![A-Za-z0-9_])_thread_test_func(?![A-Za-z0-9_])/thread_test_func_/g;
s/(?<![A-Za-z0-9_])_thread_test_mutex(?![A-Za-z0-9_])/thread_test_mutex_/g;
s/(?<![A-Za-z0-9_])_thread_test_start1(?![A-Za-z0-9_])/thread_test_start1_/g;
s/(?<![A-Za-z0-9_])_thread_test_start2(?![A-Za-z0-9_])/thread_test_start2_/g;
s/(?<![A-Za-z0-9_])_thread_test_strmap(?![A-Za-z0-9_])/thread_test_strmap_/g;
s/(?<![A-Za-z0-9_])_tor_calloc(?![A-Za-z0-9_])/tor_calloc_/g;
s/(?<![A-Za-z0-9_])_TOR_CHANNEL_INTERNAL(?![A-Za-z0-9_])/TOR_CHANNEL_INTERNAL_/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITMUX_EWMA_C(?![A-Za-z0-9_])/TOR_CIRCUITMUX_EWMA_C_/g;
s/(?<![A-Za-z0-9_])_tor_free(?![A-Za-z0-9_])/tor_free_/g;
s/(?<![A-Za-z0-9_])_tor_malloc(?![A-Za-z0-9_])/tor_malloc_/g;
s/(?<![A-Za-z0-9_])_tor_malloc_zero(?![A-Za-z0-9_])/tor_malloc_zero_/g;
s/(?<![A-Za-z0-9_])_tor_memdup(?![A-Za-z0-9_])/tor_memdup_/g;
s/(?<![A-Za-z0-9_])_tor_realloc(?![A-Za-z0-9_])/tor_realloc_/g;
s/(?<![A-Za-z0-9_])_tor_strdup(?![A-Za-z0-9_])/tor_strdup_/g;
s/(?<![A-Za-z0-9_])_tor_strndup(?![A-Za-z0-9_])/tor_strndup_/g;
s/(?<![A-Za-z0-9_])_TOR_TLS_SYSCALL(?![A-Za-z0-9_])/TOR_TLS_SYSCALL_/g;
s/(?<![A-Za-z0-9_])_TOR_TLS_ZERORETURN(?![A-Za-z0-9_])/TOR_TLS_ZERORETURN_/g;
s/(?<![A-Za-z0-9_])__USE_ISOC99(?![A-Za-z0-9_])/_USE_ISOC99_/g;
s/(?<![A-Za-z0-9_])_UsingTestNetworkDefaults(?![A-Za-z0-9_])/UsingTestNetworkDefaults_/g;
s/(?<![A-Za-z0-9_])_val(?![A-Za-z0-9_])/val_/g;
s/(?<![A-Za-z0-9_])_void_for_alignment(?![A-Za-z0-9_])/void_for_alignment_/g;
==============================
2012-10-12 12:22:13 -04:00
Nick Mathewson
7ea904cbc0
Merge branch 'bug7011'
...
Conflicts:
src/or/circuitbuild.c
The conflict was trivial, since no line of code actually changed in
both branches: There was a fmt_addr() that turned into fmt_addrport()
in bug7011, and a "if (!n_conn)" that turned into "if (!n_chan)" in
master.
2012-10-10 22:31:06 -04:00
David Fifield
8419d18441
Use fmt_addrport where appropriate.
...
This is mostly a conversion from this pattern:
log("... %s:%d ...", fmt_and_decorate_addr(&addr), port);
to this:
log("... %s ...", fmt_addrport(&addr, port));
The output is the same in all cases.
2012-10-10 22:25:30 -04:00
David Fifield
34c6ee7e9b
Use fmt_and_decorate_addr in log messages.
2012-10-10 22:25:29 -04:00
Andrea Shepard
5543c5b202
Fix formatting in various places after 6465/6816 work
2012-10-10 00:48:36 -07:00
Andrea Shepard
9d615cc5c0
Set circuitmux policy on existing active channels when ewma_enabled changes
2012-10-10 00:44:47 -07:00