aboutsummaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
AgeCommit message (Collapse)Author
2010-09-24Consistency issues in load_windows_system_library patch. Thanks SebastianNick Mathewson
2010-09-21Use load_windows_system_library in place of LoadLibraryNick Mathewson
2010-09-19Attempt to fix compilation on WindowsSebastian Hahn
Our attempt to make compilation work on old versions of Windows again while keeping wince compatibility broke the build for Win2k+. helix reports this patch fixes the issue for WinXP. Bugfix on 0.2.2.15-alpha; related to bug 1797.
2010-08-20Make the windows build succeed with or without -DUNICODE enabled.Nick Mathewson
This should keep WinCE working (unicode always-on) and get Win98 working again (unicode never-on). There are two places where we explicitly use ASCII-only APIs, still: in ntmain.c and in the unit tests. This patch also fixes a bug in windoes tor_listdir that would cause the first file to be listed an arbitrary number of times that was also introduced with WinCE support. Should fix bug 1797.
2010-05-24Port Tor to work on Windows CEvalerino
Most of the changes here are switches to use APIs available on Windows CE. The most pervasive change is that Windows CE only provides the wide-character ("FooW") variants of most of the windows function, and doesn't support the older ASCII verions at all. This patch will require use of the wcecompat library to get working versions of the posix-style fd-based file IO functions. [commit message by nickm]
2010-01-25Try to untangle the logic in server_port_flushNick Mathewson
It's a bit confusing to have a loop where another function, confusingly named "*_free", is responsible for advancing the loop variable (or rather, for altering a structure so that the next time the loop variable's initializer is evaluated it evaluates to something different.) Not only has this confused people: it's also confused coverity scan. Let's fix that.
2010-01-20Don't use OutboundBindAddress to connect to localhostNick Mathewson
The OutboundBindAddress option is useful for making sure that all of your outbond connections use a given interface. But when connecting to 127.0.0.1 (or ::1 even) it's important to actually have the connection come _from_ localhost, since lots of programs running on localhost use the source address to authenticate that the connection is really coming from the same host. Our old code always bound to OutboundBindAddress, whether connecting to localhost or not. This would potentially break DNS servers on localhost, and socks proxies on localhost. This patch changes the behavior so that we only look at OutboundBindAddress when connecting to a non-loopback address.
2009-09-29Include util.h and log.h as relative paths.Nathan Freitas
This shouldn't be necessary, but apparently the Android cross-compiler doesn't respect -I as well as it should. (-I is supposed to add to the *front* of the search path. Android's gcc wrapper apparently likes to add to the end. This is broken, but we need to work around it.)
2009-09-01Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-09-01Fix compile warnings on Snow LeopardSebastian Hahn
Big thanks to nickm and arma for helping me with this!
2009-08-09Switch over to tor_strtok_r instead of strtok_r.Mike Perry
2009-06-30Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-06-30Have eventdns set the "truncated" bit correctly.Nick Mathewson
Fixed bug 1022; This isn't actually a live bug in Tor, since in Tor we never generate large DNS replies.
2009-06-12Update Tor to use Libevent 2.0 APIs when available.Nick Mathewson
This patch adds a new compat_libevent.[ch] set of files, and moves our Libevent compatibility and utilitity functions there. We build them into a separate .a so that nothing else in src/commmon depends on Libevent (partially fixing bug 507). Also, do not use our own built-in evdns copy when we have Libevent 2.0, whose evdns is finally good enough (thus fixing Bug 920).
2009-05-25Merge commit 'origin/maint-0.2.1' into master.Nick Mathewson
Conflicts: ChangeLog configure.in contrib/tor-mingw.nsi.in src/win32/orconfig.h
2009-05-25Use tor_socket_strerror in eventdns.c. Fixes bug 987.Nick Mathewson
2009-05-22Improved bug-957 fix for 0.2.2.Nick Mathewson
Really, our idiocy was that we were calling event_set() on the same event more than once, which sometimes led to us calling event_set() on an event that was already inserted, thus making it look uninserted. With this patch, we just initialize the timeout events when we create the requests and nameservers, and we don't need to worry about double-add and double-del cases at all.
2009-05-22Finish up the 0.2.1 version of the bug 957 fix.Nick Mathewson
Basically, all this means is downgrading our warning messages to debug messages, since the bug workaround code here is adequate to stop the bug.
2009-05-18Possible fix for crash bug related to event timeouts. [Bug 957]Nick Mathewson
If we ever add an event, then set it, then add it again, there will be now two pointers to the event in the event base. If we delete one and free it, the first pointer will still be there, and possibly cause a crash later. This patch adds detection for this case to the code paths in eventdns.c, and works around it. If the warning message ever displays, then a cleverer fix is in order. {I am not too confident that this *is* the fix, since bug 957 is very tricky. If it is, it is a bugfix on 0.2.0.}
2009-02-23Fix one case of bug 929.Nick Mathewson
svn:r18683
2009-02-23Add some debugging code to try to catch the likely cause of bug 929Nick Mathewson
svn:r18682
2009-02-11Revert an erroneous part of the non-fix to bug 326, and add comments to ↵Nick Mathewson
explain why it was erroneous. svn:r18494
2009-02-11I worry that the CLEAR() macro in eventdns.c is hiding bugs. That is sad, ↵Nick Mathewson
because it was meant to make them more detectable. Change it to change stuff to garbage rather than to 0. If no bugs turn up, we can remove it in 0.2.2.x svn:r18493
2009-02-11Port some mostly cosmetic eventdns changes from libeventNick Mathewson
svn:r18492
2009-02-09Remove some deadcode and use tor_inet_aton uniformly.Nick Mathewson
svn:r18422
2009-02-09Fix a remote-crash bug. This will need a patch release.Nick Mathewson
svn:r18421
2009-01-28Fix a race condition on nameserver reconfiguration.Nick Mathewson
This resolves bug 526, wherein we would crash if the following events occurred in this order: A: We're an OR, and one of our nameservers goes down. B: We launch a probe to it to see if it's up again. (We do this hourly in steady-state.) C: Before the probe finishes, we reconfigure our nameservers, usually because we got a SIGHUP and the resolve.conf file changed. D: The probe reply comes back, or times out. (There is a five-second window for this, after B has happens). IOW, if one of our nameservers is down and our nameserver configuration has changed, there were 5 seconds per hour where HUPing the server was unsafe. Bugfix on 0.1.2.1-alpha. Too obscure to backport. svn:r18306
2009-01-14Fix a compile warning on win32.Nick Mathewson
svn:r18099
2009-01-06Make outgoing DNS requests respect OutboundBindAddress.Nick Mathewson
Fixes the bug part of bug 789. svn:r17983
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2009-01-02Only set sin_len/sin6_len when they exist.Nick Mathewson
svn:r17851
2009-01-02Try harder to make sure we zero-out the extraneous sockaddr fields and that ↵Nick Mathewson
we set sockaddr_len. Conceivably a backport candidate, though nothing has yet been sen to break. svn:r17849
2008-12-30Indeed, arma was right. There was one ntohl too many in debug_ntop in ↵Nick Mathewson
eventdns.c svn:r17826
2008-12-30point out the bug location to nick. unless i'm wrong.Roger Dingledine
svn:r17825
2008-12-29More compilation tweaks on Android: fix two clear errors in our code that ↵Nick Mathewson
apparently the compiler cares about there. svn:r17808
2008-12-19Move in-addr.arpa parsing and generation into address.c, and simplify the ↵Nick Mathewson
code that does it elsewhere. Incidentally, this lets exit servers answer requests for ip6.arpa addresses. svn:r17707
2008-12-18Do not leak the DNS server port structure.Nick Mathewson
svn:r17680
2008-12-17Resolve many DOCDOCs.Nick Mathewson
svn:r17662
2008-12-10Fix a logic error that would automatically reject all but the first ↵Nick Mathewson
configured DNS server. Bugfix on 0.2.1.5-alpha. Possible fix for part of 813/868. Spotted by coderman svn:r17569
2008-11-22Consider GetNetworkParams() nameserver parsing to have suceeded if even one ↵Nick Mathewson
nameserver can be added. Log more useful info about what exactly is failing when we fail to add a nameserver. svn:r17368
2008-10-29Implement the 0x20-hack to make DNS poisoning harder against us, especially ↵Nick Mathewson
when resolving large names. Add a cfg option to disable it, since apparently 3/10 of a percent of servers get it wrong. svn:r17171
2008-10-08fix typo in log entryRoger Dingledine
svn:r17050
2008-09-22Oops; we need to make sure that DNS request names are matched in the ↵Nick Mathewson
_questions_ section of the replies. Rejecting answers whether the _answers_ section did not match made us reject A records waiting at the end of a CNAME record. Bug 823. svn:r16933
2008-09-04Fix mingw build with --enable-gcc-warnings set.Nick Mathewson
svn:r16759
2008-08-27Oops; set address families on nameservers.Nick Mathewson
svn:r16674
2008-08-22Oops. Linux has no sa_len field.Nick Mathewson
svn:r16627
2008-08-22 r17846@tombo: nickm | 2008-08-22 11:54:00 -0400Nick Mathewson
Make dns resolver code more robust: handle nameservers with IPv6 addresses, make sure names in replies match requested names, make sure origin address of reply matches the address we asked. svn:r16621
2008-02-24 r14410@tombo: nickm | 2008-02-23 16:51:46 -0500Nick Mathewson
Fix the last of the -Wshorten-64-to-32 warnings. svn:r13696
2008-02-21 r14371@tombo: nickm | 2008-02-21 16:13:18 -0500Nick Mathewson
Fix all -Wshorten-64-to-32 warnings that appear on my macbook. svn:r13662
2008-02-20 r18263@catbus: nickm | 2008-02-20 12:45:15 -0500Nick Mathewson
Oops. not supposed to use tor_assert() in eventdns.c svn:r13622