264 Commits

Author SHA1 Message Date
Nick Mathewson
539466e568 Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	Makefile.am
	WIN32-Code/event2/event-config.h
	configure.in
2012-02-10 17:33:50 -05:00
Nick Mathewson
e49e289129 Update copyright notices to 2012 2012-02-10 17:29:53 -05:00
Nick Mathewson
713e570ab4 Save some syscalls when creating evdns sockets 2012-02-10 16:32:50 -05:00
Nick Mathewson
032aac156c Merge remote-tracking branch 'origin/patches-2.0' 2012-02-01 14:57:44 -05:00
Nick Mathewson
d6094b160f evdns: fix a bug in circular-queue implementation
found by Wang Qin
2012-02-01 14:56:43 -05:00
Nick Mathewson
fc1a2514a1 Merge remote-tracking branch 'origin/patches-2.0' 2011-10-19 22:20:15 -04:00
Leonid Evdokimov
21a08d6869 Empty DNS reply with OK status is another way to say NODATA.
Sometimes DNS reply has nothing but query section. It does not look like
error, so it should be treated as NODATA with TTL=0 as soon as there is
no SOA record to deduce negative TTL from.
2011-10-19 22:15:35 -04:00
Nick Mathewson
b3bc77b673 Merge remote-tracking branch 'origin/patches-2.0' 2011-10-03 12:54:35 -04:00
Nick Mathewson
39c0cf7ca4 Fix some "value never used" warnings with gcc 4.6.1 2011-10-03 12:49:02 -04:00
Nick Mathewson
38674d4a5e Merge remote-tracking branch 'origin/patches-2.0' 2011-09-12 15:46:54 -04:00
Leonid Evdokimov
94fba5b9ac Add DNS_ERR_NODATA error code to handle empty replies. 2011-09-12 15:38:05 -04:00
Nick Mathewson
804f77fbb8 Merge remote-tracking branch 'origin/patches-2.0' 2011-09-01 17:39:37 -04:00
Leonid Evdokimov
f72e8f6643 DNS: add ttl for negative answers using RFC 2308 idea. 2011-09-01 11:03:51 -04:00
Nick Mathewson
d7451b0523 Merge remote-tracking branch 'origin/patches-2.0' 2011-08-15 11:14:57 -04:00
Leonid Evdokimov
aff6ba15a1 Fix request_finished memory leak with debugging turned on. 2011-08-15 11:12:57 -04:00
Nick Mathewson
9f560bfa11 Use "_WIN32", not WIN32: it's standard and we don't need to fake it
This patch was automatically generated with perl.

Based on a patch by Peter Rosin.
2011-05-25 20:03:15 -04:00
Nick Mathewson
9155b09534 Merge remote-tracking branch 'origin/patches-2.0' 2011-05-25 16:52:50 -04:00
Nick Mathewson
06a714ffe4 Fix new warnings from GCC 4.6 2011-05-25 16:52:03 -04:00
Nick Mathewson
a9fe47f076 Merge remote-tracking branch 'origin/patches-2.0' 2011-05-23 17:50:45 -04:00
Nick Mathewson
74760f1864 Fix a bug that prevented us from configuring IPv6 nameservers. 2011-05-23 17:45:50 -04:00
Nick Mathewson
614a1712b7 Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	evthread.c
2011-04-22 23:46:25 -04:00
Sebastian Hahn
5208544edc Fix possible NULL-deref in evdns_cancel_request
The clang static analyzer complained that base might be dereferenced
without being set, but this patch should fix another dereference issue.
2011-04-23 02:04:58 +02:00
Nick Mathewson
34631be00c Merge remote-tracking branch 'origin/patches-2.0' 2011-04-21 17:36:30 -04:00
Nick Mathewson
364291e9a9 Handle calloc failure in evdns. (Found by Dave Hart) 2011-04-21 17:11:41 -04:00
Nick Mathewson
169eca7b58 Merge remote-tracking branch 'origin/patches-2.0' 2011-04-21 13:38:29 -04:00
Nick Mathewson
00e91b3c8d Fix a crash bug in evdns server circular list code
Really, this should use a circleq.  That's a change for 2.1, though.
2011-04-20 13:27:31 -04:00
Nick Mathewson
d28fc52815 Merge remote-tracking branch 'origin/patches-2.0' 2011-04-14 14:20:09 -04:00
Nick Mathewson
3417f6808d Avoid a free(NULL) if out-of-memory in evdns_getaddrinfo. Found by Dave Hart 2011-04-13 11:20:30 -04:00
Nick Mathewson
8b0afe96eb Merge remote branch 'origin/patches-2.0' 2011-01-12 21:41:58 -05:00
Jardel Weyrich
666b096691 Detect and handle more allocation failures. 2011-01-07 13:03:31 -05:00
Kevin Bowling
0915ca0aa6 Include evconfig-private.h in internal files for great good. 2011-01-02 08:43:45 -07:00
Evan Jones
fbe64f216c Use relative includes instead of system includes consistently. 2010-12-02 11:03:55 -05:00
Nick Mathewson
7bcace2d54 Fix some irix compilation warnings spotted by Kevin Bowling 2010-11-22 21:02:34 -05:00
Nick Mathewson
d51b2fc655 Make evdns_getaddrinfo_cancel threadsafe 2010-11-19 12:14:18 -05:00
Nick Mathewson
c7cfbcf466 Fix some more cancel-related bugs in getaddrinfo_async
Also imposed a new rule to make this much much simpler: no freeing
the getaddrinfo request until both dns callbacks have been invoked.
2010-11-19 12:08:35 -05:00
Nick Mathewson
abf01ed13a Avoid double-invocation of user callback with EVUTIL_EAI_CANCEL 2010-11-19 12:08:34 -05:00
Nick Mathewson
494186129f Use the US-English "canceled", not the UK "cancelled". 2010-11-19 12:08:29 -05:00
Nick Mathewson
5c8a59e886 Merge remote branches 'github/20_evdns_cancel_segfault_v2', 'github/20_http_close_detect', 'github/20_http_versions', 'github/20_more_http_methods', 'github/20_shutdown_iocp_listener' and 'github/20_win64_fixes' 2010-11-09 10:19:05 -05:00
Nick Mathewson
9ed30de7ff Don't free evdns_request handles until after the callback is invoked
Previously, once the callback was scheduled, it was unsafe to cancel
a request, but there was no way to tell that.  Now it is safe to
cancel a request until the callback is invoked, at which point it
isn't.

Found and diagnosed by Denis Bilenko.
2010-11-04 11:05:29 -04:00
Nick Mathewson
ba01456999 Use the label_len local variable in evdns instead of recalculating it over and over 2010-11-02 12:42:35 -04:00
Nick Mathewson
545a61145c Fix even more win64 warnings: buffer, event_tagging, http, evdns, evrpc 2010-11-01 14:13:33 -04:00
Nick Mathewson
5b7a370636 Fix warnings on mingw with gcc 4.5 2010-10-05 14:29:48 -04:00
Nick Mathewson
a8b7674cd5 Merge remote branch 'github/signed_compare' 2010-09-28 01:09:17 -04:00
Nick Mathewson
d49b5e3326 Do not search outside of the system directory for windows DLLs
Hardens against some attacks.
2010-09-27 15:45:34 -04:00
Nick Mathewson
9c8db0f804 Fix all warnings in the main codebase flagged by -Wsigned-compare
Remember, the code
   int is_less_than(int a, unsigned b) {
      return a < b;
   }
is buggy, since the C integer promotion rules basically turn it into
   int is_less_than(int a, unsigned b) {
      return ((unsigned)a) < b;
   }
and we really want something closer to
   int is_less_than(int a, unsigned b) {
      return a < 0 || ((unsigned)a) < b;
   }
.

Suggested by an example from Ralph Castain
2010-09-23 22:45:55 -04:00
Nick Mathewson
749128b2cf Merge remote branch 'github/win32_posix_underscore' 2010-09-04 22:02:32 -04:00
Nick Mathewson
195214360c Expose a function to add a nameserver by sockaddr 2010-09-03 16:42:16 -04:00
Nick Mathewson
e50c0fcc85 Use the _func() replacements for open, fstat, etc in evutil.c on win32
Remember that in a fit of ANSI C compliance, Microsoft decided to
screw portability by renaming basically all the functions in unistd.h to
get prefixed with an understore.

For some reason, mingw didn't seem to mind, but at least some people's
compilers did: see bug 3044490.
2010-09-02 13:13:28 -04:00
Nick Mathewson
d0b884338f Set close-on-exec bit for filedescriptors created by dns subsystem.
Based on patch for 1.4 by Ralf Schmitt.
2010-08-18 10:49:12 -04:00
Nick Mathewson
ec347b9225 Move event-config.h to include/event2
This change means that all required include files are in event2, and
all files not in event2/* are optional.
2010-08-06 20:21:27 -04:00