Commit Graph

4546 Commits

Author SHA1 Message Date
Nick Mathewson
17abfa6a6a r8971@totoro: nickm | 2006-10-09 10:16:23 -0400
Move definition of ssize_t to torint.h


svn:r8670
2006-10-09 15:47:08 +00:00
Nick Mathewson
829bf4dcd0 r8970@totoro: nickm | 2006-10-09 10:12:53 -0400
Win32 patch from Matt Edman: fix compilation bugs by casting to int; defining SSIZE_T; defining USE_TWOS_COMPLEMENT in windows orconfig.h; and using the proper names for win32 functions on GetProcAddress. Also fixes bug 295.


svn:r8669
2006-10-09 15:46:21 +00:00
Roger Dingledine
c639fd8258 was this one we missed?
svn:r8666
2006-10-09 06:22:31 +00:00
Nick Mathewson
e618c15aff r8967@totoro: nickm | 2006-10-08 23:38:50 -0400
Fix some test and warn failures in last commit


svn:r8665
2006-10-09 03:39:06 +00:00
Nick Mathewson
c6f2d725d0 r8957@totoro: nickm | 2006-10-08 22:35:17 -0400
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed.  This removes some dead code and some potential bugs. Thanks to pnx.


svn:r8664
2006-10-09 02:35:51 +00:00
Nick Mathewson
c341255034 r8956@totoro: nickm | 2006-10-08 22:25:27 -0400
Fix bug with handling EVENT_NEW_DESC with verbose nicknames enabled.  Also, check for tor_vsnprintf failure in controller messages.


svn:r8663
2006-10-09 02:35:43 +00:00
Roger Dingledine
604b13c910 remove some old debugging code
svn:r8657
2006-10-08 23:20:43 +00:00
Nick Mathewson
d1c8fd9759 r8947@totoro: nickm | 2006-10-08 17:04:30 -0400
Fix signed/unsigned compare warning in eventdns.c


svn:r8654
2006-10-08 21:05:06 +00:00
Andrew Lewman
5227531744 Remove spurious void which causes builds to fail in mingw.
svn:r8650
2006-10-08 18:44:02 +00:00
Andrew Lewman
563be121c2 Add missing return so this builds on mingw.
svn:r8649
2006-10-08 18:24:31 +00:00
Roger Dingledine
f0d7a6716f In the hidden service example in torrc.sample, stop recommending
esoteric and discouraged hidden service options.


svn:r8648
2006-10-08 07:45:16 +00:00
Roger Dingledine
538c54e376 try dirport reachability testing five times less often.
it's already so darn thorough per test -- it chews through
like four circuits before giving up.


svn:r8646
2006-10-08 06:33:02 +00:00
Nick Mathewson
ea00437f74 r8933@totoro: nickm | 2006-10-07 20:33:16 -0400
whitespace fixes; add changelog for last commit.


svn:r8644
2006-10-08 00:33:43 +00:00
Nick Mathewson
1c01797c16 r8932@totoro: nickm | 2006-10-07 20:29:03 -0400
Try to make mingw capable of producing a working tor binary for win98: make all NT-service-related functions get lazy-loaded on demand.  I have no idea if this even compiles.


svn:r8643
2006-10-08 00:33:35 +00:00
Nick Mathewson
e230fe8ea6 r8926@totoro: nickm | 2006-10-07 15:56:14 -0400
refactor circuit_list_path and circuit_list_path_verbose into a common _impl function.


svn:r8642
2006-10-07 19:56:49 +00:00
Roger Dingledine
f787051e85 bump to 0.1.2.2-alpha-dev. time to go wild again.
svn:r8639
2006-10-07 19:38:21 +00:00
Nick Mathewson
f07f7a7a12 r8923@totoro: nickm | 2006-10-07 11:44:33 -0400
More doxygen comments


svn:r8637
2006-10-07 16:25:28 +00:00
Roger Dingledine
b45c210012 Bump to 0.1.2.2-alpha. Not tagged yet, so somebody can find a
compile bug on an obscure platform while i'm asleep.


svn:r8634
2006-10-07 09:30:12 +00:00
Roger Dingledine
9fb98b269c finish poking and prodding. i'm all happy now.
svn:r8633
2006-10-07 09:13:30 +00:00
Roger Dingledine
f2bd0e2f16 more minor cleanups
svn:r8630
2006-10-07 06:28:50 +00:00
Roger Dingledine
4f3827f1d1 resolve the entryguard uptime/capacity question. and mark a
new xxx that we'll want to address one day.


svn:r8628
2006-10-07 02:55:44 +00:00
Roger Dingledine
881d23847a fix something that looked scary to me. i believe this won't
change any behavior currently, but it will avoiding calling
noop code that might change for the worse some time.

nick, please confirm.


svn:r8623
2006-10-07 00:52:23 +00:00
Roger Dingledine
06e5b2283c minor cleanups
svn:r8622
2006-10-07 00:50:39 +00:00
Roger Dingledine
1cf37f90c4 bugfix and cleanups re: entry guards.
svn:r8620
2006-10-06 23:37:07 +00:00
Roger Dingledine
864069f5c7 fix a size_t-to-len compile warning
svn:r8618
2006-10-06 22:37:10 +00:00
Roger Dingledine
1d4bd3990f fetch all the v1 directory stuff way less often. plus, move
around some housecleaning calls so they still occur often.
are some of these redundant or in the wrong order? there are
so many of them, maybe they should be put into a separate
function that has better documentation.


svn:r8607
2006-10-06 09:04:11 +00:00
Roger Dingledine
d1b9de222e cleanups, closer to a changelog
svn:r8606
2006-10-06 07:50:57 +00:00
Roger Dingledine
b6e590a1a5 reapply a patch from adam langley that got clobbered when
nick merged something back in


svn:r8605
2006-10-06 06:46:08 +00:00
Roger Dingledine
baf208d7b3 bugfix: When testing reachability of our dirport, don't launch a new
test if there's already one in progress.


svn:r8604
2006-10-06 04:02:27 +00:00
Nick Mathewson
c15dc2d94c r9101@Kushana: nickm | 2006-10-05 23:05:11 -0400
Trivial fix for solaris build.  Libevent will want to use its own fix here, and probably already has.


svn:r8601
2006-10-06 03:05:19 +00:00
Nick Mathewson
4767d533f7 r9097@Kushana: nickm | 2006-10-05 14:51:57 -0400
Make eventdns.c formatting a little closer to evdns.c in libevent; add some bulletproofing to APPEND16 macro; clean some messages.


svn:r8600
2006-10-05 19:22:26 +00:00
Roger Dingledine
64b5fd3194 checkpoint some cleanups
svn:r8599
2006-10-05 08:23:21 +00:00
Nick Mathewson
5391ceb21a r9087@Kushana: nickm | 2006-10-04 01:19:15 -0400
We're trying to catch the kind of jerk who'd hijack zy6pzwohtnlq.test,
 not the kind of lunatic who'd hijack zy6pzwohtnlq%s.test, though
 apparently those exist too.
 


svn:r8595
2006-10-04 05:19:40 +00:00
Nick Mathewson
50320ac420 r8862@totoro: nickm | 2006-10-03 14:54:14 -0400
Make verbose names get used (when appropriate and selected) in responses to getinfo requests.


svn:r8593
2006-10-03 19:00:18 +00:00
Nick Mathewson
4c10464e13 r8861@totoro: nickm | 2006-10-03 14:49:54 -0400
Fix bug in r8579: TrackHostExits .foo.bar implies TrackHostExits foo.bar; also fix logic error.


svn:r8592
2006-10-03 19:00:12 +00:00
Nick Mathewson
29fa9eb216 r8860@totoro: nickm | 2006-10-03 14:48:33 -0400
Use ANSI-style definition syntax in strlcat.c and strlcpy.c so that gcc stops barfing with -Wold-style-definition


svn:r8591
2006-10-03 19:00:07 +00:00
Nick Mathewson
1ae7282d9b r8857@totoro: nickm | 2006-10-03 13:54:21 -0400
Implement ORCONN with verbose names.


svn:r8588
2006-10-03 18:59:52 +00:00
Nick Mathewson
55bd42d50f r8841@totoro: nickm | 2006-10-02 15:59:21 -0400
Add EXTENDED_EVENTS to the USEFEATURE command; move flag from connection_t into control_conn, since we will probably grow more of these.


svn:r8585
2006-10-03 18:58:56 +00:00
Nick Mathewson
c796adc7df r8840@totoro: nickm | 2006-10-02 15:56:16 -0400
Add USEFEATURE to control changes to control protocol.  Use like __future__ directive from Python.  Will spec before pushing changes. No, really. :)


svn:r8584
2006-10-03 18:58:52 +00:00
Nick Mathewson
eb0f51f2a3 r8839@totoro: nickm | 2006-10-02 15:31:49 -0400
Make a field longer to accomodate verbose nicknames; note that verbose nicknames will never reach this point.


svn:r8583
2006-10-03 18:58:47 +00:00
Nick Mathewson
6e0b90a902 r8838@totoro: nickm | 2006-10-02 15:24:39 -0400
Partial implementation of revised nickname syntax for controllers.  Implement ability to look up routers by "verbose" nicknames; add a per-v1-control-connection flag to turn the feature on in events.  Needs testing, spec, ability to actually turn on the flag, double-checking that we wont overflow any nickname buffers, and changelog.


svn:r8582
2006-10-03 18:58:40 +00:00
Roger Dingledine
246fecb585 the other half of the is_local_IP patch
svn:r8581
2006-10-03 05:45:58 +00:00
Nick Mathewson
4c56ac93ca r8851@totoro: nickm | 2006-10-02 18:13:27 -0400
Remove/clarify some XXXs for no longer being accurate; for begin things we do not indend to fix; for already being parts of big todo issues (like "/* XXX ipv6 */"); etc. Also fix some spaces.


svn:r8580
2006-10-02 22:13:42 +00:00
Nick Mathewson
4de9f45d6f r8850@totoro: nickm | 2006-10-02 17:21:11 -0400
Make TrackExitHosts case-insensitive, and fix the behavior of .suffix TrackExitHosts items to avoid matching in the middle of an address. (Resolves an XXXX)


svn:r8579
2006-10-02 22:13:37 +00:00
Nick Mathewson
bff83b666c r8846@totoro: nickm | 2006-10-02 16:59:57 -0400
Move is_local_IP to config.c; have it check for same-/24; make it used only for reachability (not for banwidth, because that is probably not what we want). Fixes an XXX.


svn:r8578
2006-10-02 21:00:35 +00:00
Nick Mathewson
d75edc35cc r8845@totoro: nickm | 2006-10-02 16:34:58 -0400
Fix an XXXX: make path_is_relative work on windows even though we never use it there.


svn:r8577
2006-10-02 21:00:24 +00:00
Nick Mathewson
36adc7cdd9 r8844@totoro: nickm | 2006-10-02 16:32:44 -0400
Resolve an XXXX: make sure that we are actually on 2s-complement hardware.


svn:r8576
2006-10-02 21:00:20 +00:00
Nick Mathewson
14f9b537d1 r8835@totoro: nickm | 2006-10-02 12:54:41 -0400
Improve error messages from AUTHENTICATE attempts to controller.


svn:r8574
2006-10-02 18:08:46 +00:00
Roger Dingledine
a3efc8e3d1 - V1 authorities should set "HSAuthoritativeDir 1" to continue being
hidden service authorities too.
- Just because your DirPort is open doesn't mean people should be
  able to remotely teach you about hidden service descriptors. Now
  only accept rendezvous posts if you've got HSAuthoritativeDir set.


svn:r8573
2006-10-01 22:16:55 +00:00
Nick Mathewson
57ffca883d r8826@totoro: nickm | 2006-10-01 17:58:45 -0400
Disprefer exit nodes for entry, middle positions (fixes bug 200).  Also, switch to using a uint64_t to hold "total bandwidth for all nodes" under consideration; crypt_rand_int would have died at 2GB/s network capacity.


svn:r8571
2006-10-01 21:59:09 +00:00
Nick Mathewson
219ad6395c r8825@totoro: nickm | 2006-10-01 17:41:27 -0400
Add function to return a random uint64_t.


svn:r8570
2006-10-01 21:59:05 +00:00
Roger Dingledine
3fcf736c83 misc touchups
svn:r8568
2006-10-01 21:42:44 +00:00
Nick Mathewson
ce72a9914e r8822@totoro: nickm | 2006-10-01 16:24:22 -0400
Fix bug 303: reject attempts to use Tor as a one-hop proxy.


svn:r8566
2006-10-01 20:50:11 +00:00
Roger Dingledine
7ed921708f Track down a seg fault that's been bothering me a while: if you
enable your dirport as a client, you'll crash.


svn:r8561
2006-10-01 07:53:17 +00:00
Roger Dingledine
4096e577c5 if we fail to build a circuit to an intended enclave, and it's
not mandatory that we use that enclave, stop wanting it.


svn:r8559
2006-10-01 06:41:13 +00:00
Roger Dingledine
96a4cb1dfa touchups
svn:r8558
2006-10-01 04:55:12 +00:00
Roger Dingledine
e6f4431722 stop trying to hammer router_rebuild_descriptor() when we don't
have a public address we like yet.


svn:r8554
2006-09-30 20:40:26 +00:00
Roger Dingledine
0fb7a7de95 Bugfix: when we tunnel our dir fetches via tor, don't believe
the X-Forwarded-For header.


svn:r8553
2006-09-30 20:14:15 +00:00
Nick Mathewson
fc9dd98d4c r8805@totoro: nickm | 2006-09-30 16:07:13 -0400
Oops; nameserver list is circular.


svn:r8552
2006-09-30 20:07:37 +00:00
Roger Dingledine
075cb54d9b make hidden service predicted circuits correct rather than
exactly incorrect. i wonder how much this will help.


svn:r8550
2006-09-30 19:22:24 +00:00
Nick Mathewson
723ff1c93d r8800@totoro: nickm | 2006-09-29 23:10:49 -0400
Resolve bug 336: When displaying circuit paths with non-named routers, use their digests, not their nicknames.


svn:r8548
2006-09-30 03:11:13 +00:00
Nick Mathewson
2cb956d1f5 r9036@Kushana: nickm | 2006-09-29 18:59:51 -0400
I am glad that arma reviews my patches.


svn:r8546
2006-09-29 22:59:59 +00:00
Nick Mathewson
c2d304366b r9032@Kushana: nickm | 2006-09-29 18:51:42 -0400
Now, all log messages should be distinct.


svn:r8545
2006-09-29 22:51:47 +00:00
Nick Mathewson
7d366f61cb r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400
Differentiate more duplicated log entries


svn:r8542
2006-09-29 22:33:40 +00:00
Nick Mathewson
8308a37908 r9023@Kushana: nickm | 2006-09-29 17:27:24 -0400
Make distinct all non-bug messages at notice or higher that appear 3 or more times.


svn:r8541
2006-09-29 22:33:34 +00:00
Nick Mathewson
87648bdcf8 r9008@Kushana: nickm | 2006-09-29 13:50:10 -0400
Doxygen comments for code in common.  Also simplify a few code paths to be more clear/speedy/correct.


svn:r8536
2006-09-29 18:13:37 +00:00
Nick Mathewson
b21e656eaf r9007@Kushana: nickm | 2006-09-29 13:17:32 -0400
Make eventdns give strings for DNS errors, not just error numbers.


svn:r8535
2006-09-29 18:13:33 +00:00
Nick Mathewson
05604c60d4 r9006@Kushana: nickm | 2006-09-29 10:48:23 -0400
Omit function names from NOTICE, WARN and ERR messages unless they are in LD_BUG.


svn:r8534
2006-09-29 18:13:29 +00:00
Nick Mathewson
0335bd51d3 r9005@Kushana: nickm | 2006-09-29 10:37:55 -0400
Implement DESCCHANGED event to tell controller when our router descriptor changes.


svn:r8533
2006-09-29 18:13:25 +00:00
Nick Mathewson
8992bf6204 r8776@totoro: nickm | 2006-09-29 00:50:46 -0400
Reserve the nickname "Unnamed" for routers that can't pick a hostname; any
 router can call itself Unnamed; directory servers will never allocate Unnamed
 to any particular router; clients won't believe that any router is the
 canonical Unnamed.
 


svn:r8529
2006-09-29 04:51:28 +00:00
Nick Mathewson
9dbfb91f17 r8997@Kushana: nickm | 2006-09-28 23:40:22 -0400
[Needs review.] Add a BEGIN_DIR relay cell type for an easier
 in-protocol way to connect to directory servers through Tor.
 Previously, clients could only connect to director servers over Tor
 from exit nodes, but couldn't get directory information anonymously
 from a non-exit cache without getting a directory server involved.
 
 This needs testing, and needs client-side code to actually exercise it.
 


svn:r8527
2006-09-29 03:50:11 +00:00
Roger Dingledine
4791a4f1c9 combine the cutoff log entries
svn:r8524
2006-09-29 00:19:43 +00:00
Nick Mathewson
907fc6c73e r8977@Kushana: nickm | 2006-09-28 19:56:41 -0400
Make "is a v1 authority", "is a v2 authority", and "is a hidden service authority" into separate flags so we can eventually migrate more trust away from moria.


svn:r8523
2006-09-28 23:57:59 +00:00
Nick Mathewson
1a444e089a r8976@Kushana: nickm | 2006-09-28 17:18:57 -0400
Another tweak to guard logic: ignore check for the Guard flag if a server is listed on EntryNodes.  (Also remove redundant checks for always-set variables.)


svn:r8522
2006-09-28 23:57:56 +00:00
Nick Mathewson
d174cccd0b r8975@Kushana: nickm | 2006-09-28 17:13:53 -0400
Document entry-guard related functions


svn:r8521
2006-09-28 23:57:52 +00:00
Nick Mathewson
d3a06684bc r8974@Kushana: nickm | 2006-09-28 17:05:59 -0400
Improvement to last entry guards patch: track when we last attempted to connect to a node in our state file along with how long it has been unreachable.  Also clarify behavior of parse_iso_time() when it gets extra characters.


svn:r8520
2006-09-28 23:57:49 +00:00
Nick Mathewson
9988112c87 r8973@Kushana: nickm | 2006-09-28 16:53:19 -0400
Refactor entry guard status logic a lot; allow more factors [like not
 having a Guard flag or being listed in ExcludeNodes] to render a guard
 "unlisted" (now called "unusable"); track guard down status (now
 called "unreachable") separately from is_running.


svn:r8519
2006-09-28 23:57:44 +00:00
Peter Palfrader
bc25e87754 r9897@danube: weasel | 2006-09-29 01:08:44 +0200
Add a space in a wrapped log message


svn:r8517
2006-09-28 23:08:54 +00:00
Peter Palfrader
c339bd2713 r9895@danube: weasel | 2006-09-29 01:05:00 +0200
Restore to previous wording that svk merging made me mess up


svn:r8516
2006-09-28 23:05:17 +00:00
Peter Palfrader
540fbaae75 r9889@danube: weasel | 2006-09-29 00:57:42 +0200
bandwidth is not measured in bytes


svn:r8515
2006-09-28 22:59:36 +00:00
Peter Palfrader
9e6c0b8b3b r9888@danube: weasel | 2006-09-29 00:57:02 +0200
Also log guard bandwidth cutoff


svn:r8514
2006-09-28 22:59:25 +00:00
Peter Palfrader
14882b3ec0 r9770@danube: weasel | 2006-09-15 07:20:05 +0200
router_set_networkstatus() gets a list of status documents we asked for from
 connection_dir_client_reached_eof().  However, as a cache we (sometimes?) just
 ask for "all".  router_set_networkstatus() would freak out over that, meaning
 it would log a warning and drop the status document instead of caching it
 as it is supposed to.  Now we let router_set_networkstatus() know if the
 data comes from an all-request so it can do the right thing.


svn:r8513
2006-09-28 22:58:58 +00:00
Nick Mathewson
95132f836a r8750@totoro: nickm | 2006-09-27 20:52:01 -0400
Fix some warnings on mingw; hopefully this should let us build on mingw without warnings.


svn:r8509
2006-09-28 00:53:02 +00:00
Nick Mathewson
ba7868c7b3 r8969@Kushana: nickm | 2006-09-26 18:00:36 -0400
Remove a signed/unsigned comparison in eventdns.c


svn:r8508
2006-09-26 22:03:26 +00:00
Nick Mathewson
cd2425ffa0 r8968@Kushana: nickm | 2006-09-26 17:53:27 -0400
Fix for reverse dns: only assume we will get an answer when the result was success.


svn:r8507
2006-09-26 22:03:23 +00:00
Nick Mathewson
49ad1eefa1 Add an EnforceDistinctSubnets option so that clients who know what they are doing (mainly people with private testing networks) can disable our same-/16 detection.
svn:r8504
2006-09-25 22:12:54 +00:00
Nick Mathewson
01f9e97d43 Minor fix: add code to eventdns so it can free memory on shutdown. This should help valgrind and dmalloc freak out less.
svn:r8503
2006-09-25 20:38:58 +00:00
Nick Mathewson
52e179b942 Trivial fix to make dmalloc happier: release memory held in static member of escaped().
svn:r8502
2006-09-25 18:46:29 +00:00
Nick Mathewson
4fe76e7b6b Free named_server_map on shutdown.
svn:r8500
2006-09-25 16:06:39 +00:00
Nick Mathewson
0f8491a254 Backport candidate: remove dangerous free(0) on hashtable init
svn:r8499
2006-09-25 16:06:09 +00:00
Nick Mathewson
78c068397a add missing paren in dmalloc tor_free
svn:r8498
2006-09-25 15:44:40 +00:00
Roger Dingledine
ad430b9561 checkpoint changelog and general polishing
svn:r8497
2006-09-25 05:59:13 +00:00
Roger Dingledine
bc848c8740 add 6697 (ircs) as longlivedport.
svn:r8496
2006-09-25 05:24:43 +00:00
Roger Dingledine
bda137501e whitespace cleanups
svn:r8485
2006-09-24 20:54:59 +00:00
Nick Mathewson
11b4296b0b Marge changes from libevent evdns to our eventdns. Most are cosmetic, but one or two are stability-related. This should make it easier to push our changes back towards libevent.
svn:r8482
2006-09-24 17:52:23 +00:00
Nick Mathewson
d3af1f2189 Backport candidate: Fix a long-standing server-side DNS bug. When a
client asks us to resolve (not connect to) an address, and we have a
cached answer, give them the cached answer.  Previously, we would give
them no answer at all.



svn:r8478
2006-09-24 17:05:00 +00:00
Nick Mathewson
4218f09820 r8910@Kushana: nickm | 2006-09-22 12:14:05 -0400
Instead of just checking known-invalid addresses for DNS hijacking, we
 now check randomly generated addresses, and if too many of them map to
 the same IP, we assume that IP is the destination of a DNS hijack
 attempt.
 
 A little bird tells me that some DNS hijackers think that declining to
 give an A record for RFC2606 addresses (like .invalid and .example)
 makes them more standards compliant.  Standardswise, this is like an
 illicit brothel making sure that nobody has pulled the tags off the
 mattresss, but that doesn't get us out of working around it.
 


svn:r8465
2006-09-22 20:20:26 +00:00
Nick Mathewson
bde5939ad3 r8909@Kushana: nickm | 2006-09-22 00:38:13 -0400
Consider changes to has_old_dnsworkers as noncosmetic


svn:r8464
2006-09-22 20:20:21 +00:00
Roger Dingledine
aa77298819 remove 8888 as a long lived port. i can't remember why it's
on the list.


svn:r8461
2006-09-22 19:29:26 +00:00
Nick Mathewson
f0f3bbc63b r8901@Kushana: nickm | 2006-09-21 20:43:48 -0400
I tracked a bug in server-side reverse DNS to something concerning the caching code. Ive disabled server-side cacheing for reverse DNS answers for now, and I am noting the bug in the TODO.


svn:r8454
2006-09-22 00:45:08 +00:00
Nick Mathewson
6b3f6afb58 r8895@Kushana: nickm | 2006-09-21 20:05:11 -0400
Debug client-side reverse dns code.


svn:r8452
2006-09-22 00:44:07 +00:00
Nick Mathewson
213658f117 r8894@Kushana: nickm | 2006-09-21 18:30:42 -0400
Specify and implement SOCKS5 interface for reverse hostname lookup.


svn:r8451
2006-09-22 00:43:55 +00:00
Roger Dingledine
9bc8d69dfc remove some loud log messages
svn:r8450
2006-09-22 00:24:27 +00:00
Nick Mathewson
29a756af8e Fix a couple of server-side reverse dns bugs
svn:r8449
2006-09-22 00:10:26 +00:00
Nick Mathewson
63395c747c Fix stupid C mistake. Glad I caught that one fast.
svn:r8448
2006-09-21 22:57:07 +00:00
Nick Mathewson
58200f06a5 Fix bug in r8440: base32 uses 5 bytes per char, not 4.
svn:r8447
2006-09-21 22:24:45 +00:00
Nick Mathewson
4f13cb82fd r8881@Kushana: nickm | 2006-09-21 17:27:59 -0400
Allow resolve requests to non-exits when they are specifically requested (via resolve foo.bar.exit).


svn:r8446
2006-09-21 21:49:36 +00:00
Nick Mathewson
59f9487225 r8880@Kushana: nickm | 2006-09-21 17:26:02 -0400
Trivial patch to appease warn-happy gcc: mark unused parameter


svn:r8445
2006-09-21 21:49:15 +00:00
Nick Mathewson
adade79f68 r8879@Kushana: nickm | 2006-09-21 17:20:31 -0400
Oops from earlier patch; add "opt eventdns" to unittests, fix bug in routerdesc generation.


svn:r8444
2006-09-21 21:49:03 +00:00
Nick Mathewson
7c21dabef1 r8878@Kushana: nickm | 2006-09-21 17:15:47 -0400
Trivial whitespace cleanups.


svn:r8443
2006-09-21 21:48:55 +00:00
Nick Mathewson
6a1746f98f r8877@Kushana: nickm | 2006-09-21 17:12:33 -0400
Consider non-exit servers unsuitable for RESOLVE commands.


svn:r8442
2006-09-21 21:48:42 +00:00
Nick Mathewson
d273d52979 r8876@Kushana: nickm | 2006-09-21 16:58:46 -0400
Trivial cleanup: !!x is a weird way to spell x != NULL.


svn:r8441
2006-09-21 21:48:37 +00:00
Nick Mathewson
e4a9b4de4e r8875@Kushana: nickm | 2006-09-21 16:46:28 -0400
Resolve bug 330: detect ISPs that want to hijack failing DNS requests and basically domain-squat the entire internet.


svn:r8440
2006-09-21 21:48:22 +00:00
Nick Mathewson
04bec67574 r8874@Kushana: nickm | 2006-09-21 15:22:27 -0400
Rename and document SearchDomains and ResolvConf options; warn if ServerDNSResolvConfFile is given but eventdns isnt enabled.


svn:r8439
2006-09-21 21:48:16 +00:00
Nick Mathewson
083e9c2b59 r8873@Kushana: nickm | 2006-09-21 14:38:22 -0400
Fix a bug: Remember, each call to escaped() replaces the value returned from the last call to escaped().


svn:r8438
2006-09-21 21:48:11 +00:00
Nick Mathewson
a942441615 r8872@Kushana: nickm | 2006-09-21 14:00:20 -0400
Implement server-side reverse DNS using eventdns.  Add an option to routerdescs so we can tell which servers have eventdns enabled.


svn:r8437
2006-09-21 21:48:06 +00:00
Nick Mathewson
b2cc52fa02 Speed up eat_whitespace by a lot.
svn:r8434
2006-09-19 23:55:35 +00:00
Nick Mathewson
6b716fdfb9 NEEDS REVIEW. Act on previous comment, and handle named servers differently: now, we allow multiple servers with the same name in the routerlist even if that name is reserved, but we check whether names are reserved when we try to look up routers by nickname. This is a minor security fix. This makes router_add_to_routerlist O(1). This is a backport candidate.
svn:r8433
2006-09-19 23:48:14 +00:00
Nick Mathewson
5ebb949c9f Stop searching routerlist for routers with the same identity as other routers (on router insert): we already have a map for that. (We need to add an index field to routerinfo_t so we can figure out which point in the routerlist to replace.) Also, add a comment to routerlist.c; arma, please advise?
svn:r8432
2006-09-19 23:18:30 +00:00
Nick Mathewson
2d4950c837 Malloc and friends are critical-path: Thus, add an it-wont-happen branch prediction for NULL returns, and skip the malloc(0) check on platforms where malloc(0) returns a pointer.
svn:r8431
2006-09-19 22:36:48 +00:00
Nick Mathewson
7b0ec744bc Switch routerlist.c to using memcmp on digests rather than crypto_pk_cmp_keys(); speed up find_whitespace a lot (8x for me) by using a switch statement. This should speed parsing a lot of routers at once by a lot.
svn:r8430
2006-09-19 22:20:09 +00:00
Roger Dingledine
e9abe750ea eventdns patch from Adam Langley
svn:r8429
2006-09-19 21:37:03 +00:00
Nick Mathewson
4bc42f4c18 Fix a bogus free() in eventdns.c. Bug reported by xiando.
svn:r8428
2006-09-19 20:45:20 +00:00
Nick Mathewson
93beeac01d Merge in some bsockets calls, all wrapped inside #if defined(USE_BSOCKETS)
svn:r8427
2006-09-19 20:41:31 +00:00
Roger Dingledine
0494e271e7 good god, that was a bad idea. i've built 500 circuits in the past 5
minutes, trying to establish reachability of my unreachable server.


svn:r8415
2006-09-18 04:59:15 +00:00
Roger Dingledine
4920b9d1cc Fix two bugs: first, "extendcircuit" would crash if you gave it a purpose.
Second, if you give an unknown purpose, it would say:
552 Unknown purpose "purpose=foo"
Now it just says
552 Unknown purpose "foo"


svn:r8412
2006-09-18 04:24:41 +00:00
Nick Mathewson
65974f82fa r8839@Kushana: nickm | 2006-09-17 16:11:59 -0400
Add some client performance XXXXs; try to move some common case tests higher on their decision trees.


svn:r8410
2006-09-17 20:12:10 +00:00
Roger Dingledine
b049b1b014 build testing circuits more rapidly. this has a failure mode
where if circuits fail quickly, we'll fail a lot of them very
quickly and not retry for a while. so be it.


svn:r8407
2006-09-17 06:18:06 +00:00
Roger Dingledine
bfa78b3dea actually, do the bandwidth test anyway, if you've been up at
least 6 hours at your previous address.


svn:r8403
2006-09-15 18:07:11 +00:00
Roger Dingledine
a51ec44466 avoid thrashing the bandwidth exercise when we change IPs a lot.
(we avoid simply by not doing any new tests when we change IPs --
it looks like we retain our previous bandwidth estimates, so there's
no need to do new exercise. though in some cases new exercises may
still be useful. one day we'll do something smarter.)


svn:r8402
2006-09-15 18:03:53 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Roger Dingledine
769f9201a6 Send out a burst of long-range drop cells after we've established that
we're reachable. Spread them over 4 circuits, so hopefully a few will
be fast. This exercises our bandwidth and bootstraps us quicker.


svn:r8399
2006-09-15 05:30:25 +00:00
Peter Palfrader
ba091ae5d7 r9770@danube: weasel | 2006-09-15 07:20:05 +0200
router_set_networkstatus() gets a list of status documents we asked for from
 connection_dir_client_reached_eof().  However, as a cache we (sometimes?) just
 ask for "all".  router_set_networkstatus() would freak out over that, meaning
 it would log a warning and drop the status document instead of caching it
 as it is supposed to.  Now we let router_set_networkstatus() know if the
 data comes from an all-request so it can do the right thing.


svn:r8398
2006-09-15 05:20:16 +00:00
Peter Palfrader
5beb114744 r9767@danube: weasel | 2006-09-15 06:27:48 +0200
Minor documentation fix


svn:r8397
2006-09-15 04:29:36 +00:00
Nick Mathewson
e58b9c1151 r8819@Kushana: nickm | 2006-09-15 00:27:45 -0400
Implement a smartlist_uniq() that will with luck not end the world.


svn:r8396
2006-09-15 04:27:58 +00:00
Nick Mathewson
ce83f43629 r8817@Kushana: nickm | 2006-09-14 18:31:29 -0400
Patch from steve hildrey: Generate network status correctly on non-versioning dirservers


svn:r8395
2006-09-14 22:34:57 +00:00
Peter Palfrader
2cf6cfe189 r9758@danube: weasel | 2006-09-14 07:10:12 +0200
Add a comment


svn:r8391
2006-09-14 05:17:02 +00:00
Peter Palfrader
7fcec09560 r9753@danube: weasel | 2006-09-14 07:07:02 +0200
Remove duplicates from MyFamily


svn:r8390
2006-09-14 05:07:34 +00:00
Peter Palfrader
9d9e31dcf4 r9752@danube: weasel | 2006-09-14 07:06:49 +0200
Fix some dead code that is on occasion useful


svn:r8389
2006-09-14 05:07:26 +00:00
Nick Mathewson
4f888c9dfc r8808@senior-two-eighty: nickm | 2006-09-14 00:59:54 -0400
House style for no-args functions is old-style C, not C++


svn:r8388
2006-09-14 05:00:02 +00:00
Peter Palfrader
28cac25d7e r9749@danube: weasel | 2006-09-14 06:53:12 +0200
Do not graciously increase the size to be mmaped if the current size already is
 at a page_size boundary.  This is important since if a file has a size of zero
 and we mmap() it with length > 0, then accessing the mmaped memory area causes
 a bus error.  However, if we pass a length of 0 to mmap() it will return with -1
 and things work from there.


svn:r8387
2006-09-14 04:53:42 +00:00
Peter Palfrader
984e8f6efb r9736@danube: weasel | 2006-09-14 05:53:06 +0200
Refactor dirserv_parse_fingerprint_file(fname) into dirserv_load_fingerprint_file():
 There is not need to put together the path to the approved-routers file in more than one place.


svn:r8386
2006-09-14 04:53:23 +00:00
Nick Mathewson
1852f503cf r8776@Kushana: nickm | 2006-09-11 22:49:53 -0400
Avoid crash when telling controller stream-status and a stream is detached.  Fixes bug 334. Backport candidate.


svn:r8370
2006-09-12 02:50:14 +00:00
Roger Dingledine
e56dbb810f start remembering X-Your-Address-Is hints even if you're
a client, so you can become a server more smoothly.


svn:r8359
2006-09-09 19:36:51 +00:00
Roger Dingledine
9af3175687 parameterize the loudness of get_interface_address()
svn:r8358
2006-09-09 19:20:27 +00:00
Roger Dingledine
5f6351ceb3 fix typo, add log message
svn:r8357
2006-09-09 19:16:07 +00:00
Roger Dingledine
0c3cc15898 fix encoding in "getinfo addr-mappings" response.
fix error code when "getinfo dir/status/" fails.


svn:r8355
2006-09-09 03:38:03 +00:00
Roger Dingledine
29b6d6560e add a "getinfo address" controller command.
svn:r8354
2006-09-09 03:18:39 +00:00
Roger Dingledine
25cb9453d7 possibly make tor build and run on cygwin again.
svn:r8353
2006-09-08 20:48:43 +00:00
Peter Palfrader
fdd56dee69 r9695@danube: weasel | 2006-09-08 18:11:53 +0200
Make tor build with -O0


svn:r8352
2006-09-08 16:12:15 +00:00