aboutsummaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
Commit message (Expand)AuthorAge
* Rewrite comment at head of eventdns.c•••Let's make it more obvious to the everyday reader that eventdns.c is a) Based on Libevent's evdns.c b) Slated for demolition c) Supposed to keep API-compatibility with Libevent. d) Not worth tweaking unless there's a bug. Nick Mathewson2011-11-09
* Remove some duplicate includesAndrea Gelmini2011-11-03
* Don't shadow parameters with local variables•••This is a little error-prone when the local has a different type from the parameter, and is very error-prone with both have the same type. Let's not do this. Fixes CID #437,438,439,440,441. Nick Mathewson2011-07-01
* Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/common/compat.c src/or/main.c Nick Mathewson2011-05-30
|\
| * Merge remote-tracking branch 'public/bug3270' into maint-0.2.2Nick Mathewson2011-05-30
| |\
| | * Use a 64-bit type to hold sockets on win64.•••On win64, sockets are of type UINT_PTR; on win32 they're u_int; elsewhere they're int. The correct windows way to check a socket for being set is to compare it with INVALID_SOCKET; elsewhere you see if it is negative. On Libevent 2, all callbacks take sockets as evutil_socket_t; we've been passing them int. This patch should fix compilation and correctness when built for 64-bit windows. Fixes bug 3270. Nick Mathewson2011-05-23
* | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/eventdns.c Nick Mathewson2011-05-28
|\| |
| * | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-05-28
| |\ \
| | * \ Merge branch 'bug2574' into maint-0.2.1Nick Mathewson2011-05-28
| | |\ \
| | | * | Work correctly if your nameserver is ::1•••We had all the code in place to handle this right... except that we were unconditionally opening a PF_INET socket instead of looking at sa_family. Ow. Fixes bug 2574; not a bugfix on any particular version, since this never worked before. Nick Mathewson2011-05-23
* | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-28
|\| | | |
| * | | | Fix GCC 4.6's new -Wunused-but-set-variable warnings.•••Most instances were dead code; for those, I removed the assignments. Some were pieces of info we don't currently plan to use, but which we might in the future. For those, I added an explicit cast-to-void to indicate that we know that the thing's unused. Finally, one was a case where we were testing the wrong variable in a unit test. That one I fixed. This resolves bug 3208. Nick Mathewson2011-05-23
| | |_|/ | |/| |
* | | | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023•••Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c Nick Mathewson2011-05-11
|\| | |
| * | | Hand-tune the new tor_memcmp instances in 0.2.2Nick Mathewson2011-05-11
| * | | Re-apply the automated conversion to 0.2.2 to make handle any memcmps that sn...Nick Mathewson2011-05-11
| * | | Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcm...•••Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c Nick Mathewson2011-05-11
| |\| |
| | * | Hand-conversion and audit phase of memcmp transition•••Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant. Nick Mathewson2011-05-11
| | * | Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq•••This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h Nick Mathewson2011-05-11
| | |/
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-26
|\| |
| * | Merge remote-tracking branch 'public/bug2332' into maint-0.2.2Nick Mathewson2011-04-26
| |\ \
| | * | Make eventdns server functions const void* to match libevent•••partial fix for bug 2332 Nick Mathewson2011-01-10
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-21
|\| | |
| * | | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-04-21
| |\ \ \ | | | |/ | | |/|
| | * | Fix a bug in removing DNSPort requests from their circular list•••Under heavy load, this could result in an assertion failure. Fix for bug 2933; bugfix on 0.2.0.10-alpha. Nick Mathewson2011-04-21
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/common/address.c src/common/compat_libevent.c src/common/memarea.c src/common/util.h src/or/buffers.c src/or/circuitbuild.c src/or/circuituse.c src/or/connection.c src/or/directory.c src/or/networkstatus.c src/or/or.h src/or/routerlist.c Nick Mathewson2011-04-07
|\| | |
| * | | Triage the XXX022 and XXX021 comments remaining in the code•••Remove some, postpone others, leave some alone. Now the only remaining XXX022s are ones that seem important to fix or investigate. Nick Mathewson2011-03-25
| | |/ | |/|
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| |
| * | Fix compile wanrings revealed by gcc 4.5 on mingwSebastian Hahn2010-12-27
* | | Open connection to DNS resolvers with CLOEXEC flag set•••NB: this will now register the socket with the socket accounting code Steven Murdoch2010-12-01
* | | Initial work to set CLOEXEC on all possible fds•••Still to go: some pipes, all stdio files. Nick Mathewson2010-11-20
|/ /
* | Consistency issues in load_windows_system_library patch. Thanks SebastianNick Mathewson2010-09-24
* | Use load_windows_system_library in place of LoadLibraryNick Mathewson2010-09-21
* | Attempt to fix compilation on Windows•••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. Sebastian Hahn2010-09-19
* | Make the windows build succeed with or without -DUNICODE enabled.•••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. Nick Mathewson2010-08-20
* | Port Tor to work on Windows CE•••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] valerino2010-05-24
* | Try to untangle the logic in server_port_flush•••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. Nick Mathewson2010-01-25
* | Don't use OutboundBindAddress to connect to localhost•••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. Nick Mathewson2010-01-20
* | Include util.h and log.h as relative paths.•••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.) Nathan Freitas2009-09-29
* | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-09-01
|\|
| * Fix compile warnings on Snow Leopard•••Big thanks to nickm and arma for helping me with this! Sebastian Hahn2009-09-01
* | Switch over to tor_strtok_r instead of strtok_r.Mike Perry2009-08-09
* | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-06-30
|\|
| * Have eventdns set the "truncated" bit correctly.•••Fixed bug 1022; This isn't actually a live bug in Tor, since in Tor we never generate large DNS replies. Nick Mathewson2009-06-30
* | Update Tor to use Libevent 2.0 APIs when available.•••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). Nick Mathewson2009-06-12
* | Merge commit 'origin/maint-0.2.1' into master.•••Conflicts: ChangeLog configure.in contrib/tor-mingw.nsi.in src/win32/orconfig.h Nick Mathewson2009-05-25
|\|
| * Use tor_socket_strerror in eventdns.c. Fixes bug 987.Nick Mathewson2009-05-25
* | Improved bug-957 fix for 0.2.2.•••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. Nick Mathewson2009-05-22
|/
* Finish up the 0.2.1 version of the bug 957 fix.•••Basically, all this means is downgrading our warning messages to debug messages, since the bug workaround code here is adequate to stop the bug. Nick Mathewson2009-05-22
* Possible fix for crash bug related to event timeouts. [Bug 957]•••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.} Nick Mathewson2009-05-18
* Fix one case of bug 929.•••svn:r18683 Nick Mathewson2009-02-23