aboutsummaryrefslogtreecommitdiff
path: root/src/or/dns.c
Commit message (Collapse)AuthorAge
* When iterating over connections pending DNS, skip marked onesNick Mathewson2012-08-17
| | | | | | | | Failure to do this would lead to double-free cases and similar, especially when the exit's DNS was broken. See bug 6472 for full details; this is a fix for 6472. Anonymous patch from "cypherpunks" on trac.
* Avoid hard (impossible?)-to-trigger double-free in dns_resolve()Nick Mathewson2012-07-31
| | | | Fixes 6480; fix on 0.2.0.1-alpha; based on pseudonymous patch.
* trivial grammar fixRoger Dingledine2012-07-31
|
* Downgrade an eventdns warning to PROTOCOL_WARN.Nick Mathewson2012-06-07
|
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Fix a hard-to-trigger memory leak in launch_resolveNick Mathewson2012-05-18
| | | | | | | | | | | To hit this leak, you need to be a relay that gets a RESOLVE request or an exit node getting a BEGIN or RESOLVE request. You must either have unconfigured (and unconfigurable) nameservers, or you must have somehow set DisableNetwork after a network request arrived but before you managed to process it. So, I doubt this is reached often. Still, a leak's a leak. Fix for bug 5916; bugfix on 0.2.3.9-alpha and 0.1.2.1-alpha.
* Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
* Use !SOCKET_OK to test if a socket is uninitializedSebastian Hahn2012-01-23
| | | | | This fixes a compile warning on Windows. Fixes bug 4946, not in any released version.
* Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* Use SOCKET_OK macros in even more placesNick Mathewson2012-01-17
| | | | | | Add a TOR_INVALID_SOCKET macro to wrap -1/INVALID_SOCKET. Partial work for bug4533.
* Make sure we never launch an evdns resolve when DisableNetwork is 1Nick Mathewson2011-11-29
|
* Change "reverse_lookup_name" functions to refer to "PTR_name"sNick Mathewson2011-10-11
| | | | | | | | | | Under the new convention, having a tor_addr.*lookup function that doesn't do hostname resolution is too close for comfort. I used this script here, and have made no other changes. s/tor_addr_parse_reverse_lookup_name/tor_addr_parse_PTR_name/g; s/tor_addr_to_reverse_lookup_name/tor_addr_to_PTR_name/g;
* Fix names of functions that convert strings to addrsNick Mathewson2011-10-11
| | | | | | | | | | | | | | | | | | | | Now let's have "lookup" indicate that there can be a hostname resolution, and "parse" indicate that there wasn't. Previously, we had one "lookup" function that did resolution; four "parse" functions, half of which did resolution; and a "from_str()" function that didn't do resolution. That's confusing and error-prone! The code changes in this commit are exactly the result of this perl script, run under "perl -p -i.bak" : s/tor_addr_port_parse/tor_addr_port_lookup/g; s/parse_addr_port(?=[^_])/addr_port_lookup/g; s/tor_addr_from_str/tor_addr_parse/g; This patch leaves aton and pton alone: their naming convention and behavior is is determined by the sockets API. More renaming may be needed.
* Make the get_options() return constNick Mathewson2011-06-14
| | | | | | | | This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
* Merge branch 'maint-0.2.2'Roger Dingledine2011-05-20
|\
| * log the reason for publishing a new relay descriptorRoger Dingledine2011-05-19
| | | | | | | | now we have a better chance of hunting down the root cause of bug 1810.
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fixup tor_addr_to_sockaddr return conventionNick Mathewson2011-03-25
| |
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-12
|\|
| * Add missing parens to evdns_base_resolve_* macros while I am at itNick Mathewson2011-01-09
| |
| * Fix check for failed evdns request creationNick Mathewson2011-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using libevent 2, we use evdns_base_resolve_*(). When not, we fake evdns_base_resolve_*() using evdns_resolve_*(). Our old check was looking for negative values (like libevent 2 returns), but our eventdns.c code returns 1. This code makes the check just test for nonzero. Note that this broken check was not for _resolve_ failures or even for failures to _launch_ a resolve: it was for failures to _create_ or _encode_ a resolve request. Bug introduced in 81eee0ecfff3dac1e9438719d2f7dc0ba7e84a71; found by lodger; uploaded to trac by rransom. Bug 2363. Fix on 0.2.2.6-alpha.
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\|
| * Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\ | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| | * Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | Try to make most routerinfo_t interfaces constNick Mathewson2010-10-01
|/ /
* | Create relay.hSebastian Hahn2010-07-27
| |
* | Create policies.hSebastian Hahn2010-07-27
| |
* | Create main.hSebastian Hahn2010-07-27
| |
* | Create dns.hSebastian Hahn2010-07-27
| |
* | Create control.hSebastian Hahn2010-07-27
| |
* | Create connection_edge.hSebastian Hahn2010-07-27
| |
* | Create connection.hSebastian Hahn2010-07-27
| |
* | Create config.hSebastian Hahn2010-07-27
| |
* | Create circuituse.hSebastian Hahn2010-07-27
| |
* | Create circuitlist.hSebastian Hahn2010-07-27
| |
* | Create router.hSebastian Hahn2010-07-27
| |
* | Log the correct address when purging a mismatchd DNS cache addressvalerino2010-05-20
| |
* | Fix a segfault when a client is hup'd.Sebastian Hahn2010-04-03
| | | | | | | | | | | | We need to make sure we have an event_base in dns.c before we call anything that wants one. Make sure we always have one in dns_reset() when we're a client. Fixes bug 1341.
* | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-02-27
|\| | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
| |
* | Build correctly with Libevent 2.0.4-alpha and laterNick Mathewson2010-02-15
| |
* | Make tor_addr_copy() conform to memcpy requirementsNick Mathewson2010-02-09
| | | | | | | | | | | | | | | | The src and dest of a memcpy() call aren't supposed to overlap, but we were sometimes calling tor_addr_copy() as a no-op. Also, tor_addr_assign was a redundant copy of tor_addr_copy(); this patch removes it.
* | Merge branch 'ewma'Nick Mathewson2009-12-18
|\ \
| * | Enhance pqueue so we can remove items from the middle.Nick Mathewson2009-12-12
| | | | | | | | | | | | | | | | | | This changes the pqueue API by requiring an additional int in every structure that we store in a pqueue to hold the index of that structure within the heap.
* | | Merge branch 'safelogging2'Nick Mathewson2009-12-15
|\ \ \ | |/ / |/| | | | | | | | Conflicts: ChangeLog
| * | Refactor the safe_str_*() API to make more sense.Nick Mathewson2009-12-15
| | | | | | | | | | | | | | | | | | The new rule is: safe_str_X() means "this string is a piece of X information; make it safe to log." safe_str() on its own means "this string is a piece of who-knows-what; make it safe to log".
| * | Allow SafeLogging to exclude client related informationSebastian Hahn2009-12-12
| | |
* | | Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12
| | |
* | | *_free functions now accept NULLSebastian Hahn2009-12-12
|/ / | | | | | | | | | | | | | | Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
* | Another event2 evdns fix.Nick Mathewson2009-10-13
| |