2188 Commits

Author SHA1 Message Date
Gisle Vanem
a3f320e83d Improve win32 behavior of dns-sample.c codex 2011-11-09 00:17:56 -05:00
Mansour Moufid
674bc6a29e Fix typo in whatsnew-2.0.txt 2011-11-03 11:43:49 -04:00
Nick Mathewson
c37069cd79 Fix an evbuffer crash in evbuffer_remove_buffer()
Found by Greg Hazel.
2011-11-02 22:48:16 -04:00
Greg Hazel
7eb52eb85e improve test to remove at least one buffer from src 2011-11-02 22:47:02 -04:00
Greg Hazel
90bd620fa3 unit test for remove_buffer bug 2011-11-02 13:40:16 -04:00
Nick Mathewson
447b0bad15 Fix compile warning from saying event2/*.h inside a comment
Based on a patch by Adrian Chadd
2011-10-30 22:32:18 -04:00
Jamie Iles
1aee718362 epoll: close fd on alloc fail at initialization
If the memory allocations fail then we free any other allocated
structures but don't close the file descriptor resulting in an leak of
fd's.
2011-10-26 10:14:49 -04:00
Nick Mathewson
3c824bd334 Update copyright dates to 2011. 2011-10-24 13:18:09 -04:00
Nick Mathewson
724bfb56ef Add note about evhttp_send_reply_end to its doxygen 2011-10-19 22:59:47 -04:00
Leonid Evdokimov
9e6a4efa51 More detailed message in case of libevent self-debugging failure. 2011-10-19 22:41:15 -04:00
Nick Mathewson
5e42202d59 Style and comment tweaks for dns/leak* tests 2011-10-19 22:41:11 -04:00
Leonid Evdokimov
f7841bfc70 Test for commit aff6ba1 2011-10-19 22:34:09 -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
Leonid Evdokimov
d58c15ee84 Tests for 94fba5b and f72e8f6 2011-10-19 22:15:29 -04:00
Nick Mathewson
8589f6c45b Bump version to 2.0.15-stable-dev 2011-10-12 01:00:23 -04:00
Nick Mathewson
c54c2358e5 Credit a patch from a one-named user release-2.0.15-stable 2011-10-12 00:39:22 -04:00
Nick Mathewson
4d9529fcfa Increment version to 2.0.15-stable 2011-10-12 00:22:17 -04:00
Nick Mathewson
7c3e06120b Add changelog for 2.0.15-stable 2011-10-12 00:16:12 -04:00
Greg Hazel
ba5c27d47f refer to non-deprecated evdns functions in comments 2011-10-10 11:33:15 -04:00
Nick Mathewson
706aa5f416 Merge remote-tracking branch 'github/20_addfile_ssl' into patches-2.0 2011-10-06 15:11:50 -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
2b768479e4 Make write-checking fixes use tt_fail_perror 2011-10-03 12:45:36 -04:00
Mark Ellzey
c3b62fd7fd Fixed compiler warnings for unchecked read/write calls. 2011-10-03 12:40:48 -04:00
Nick Mathewson
0ba0af9c6c Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL.
The sendfile() implementation for evbuffer_add_file is potentially more
efficient, but it has a problem: you can only use it to send bytes over
a socket using sendfile().  If you are writing bytes via SSL_send() or
via a filter, or if you need to be able to inspect your buffer, it
doesn't work.

As an easy fix, this patch disables the sendfile-based implementation of
evbuffer_add_file on an evbuffer unless the user sets a new
EVBUFFER_FLAG_DRAINS_TO_FD flag on that evbuffer, indicating that the
evbuffer will not be inspected, but only written out via
evbuffer_write(), evbuffer_write_atmost(), or drained with stuff like
evbuffer_drain() or evbuffer_add_buffer().  This flag is off by
default, except for evbuffers used for output on bufferevent_socket.

In the future, it could be interesting to make a best-effort file
segment implementation that tries to send via sendfile, but mmaps on
demand.  That's too much complexity for a stable release series, though.
2011-09-29 10:32:16 -04:00
Nick Mathewson
1ef1f68462 Make evbuffer callbacks get the right n_added value after evbuffer_add
Patch from Alex.
2011-09-28 09:22:17 -04:00
Nick Mathewson
296d29a12c Merge branch '20_loopbreak_in_signal' into patches-2.0 2011-09-26 11:07:58 -04:00
Nick Mathewson
7f82382a7d Use _SOURCES, not _sources, in sample/Makefile.am
Found by Adrian Chadd
2011-09-25 07:39:00 -04:00
Sergey Avseyev
9ae061acca le-proxy and regress depend on openssl directly 2011-09-16 09:42:01 -04:00
Leonid Evdokimov
94fba5b9ac Add DNS_ERR_NODATA error code to handle empty replies. 2011-09-12 15:38:05 -04:00
Leonid Evdokimov
2b6eae5999 Fix docstring in dns.h 2011-09-12 15:09:30 -04:00
Nick Mathewson
4e8eb6a595 When a signal callback is activated to run multiple times, allow event_base_loopbreak to work even before they all have run.
Found by Abilio Marques.
2011-09-09 20:57:54 -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
a718b6c31c Increment version to 2.0.14-stable-dev 2011-08-31 11:25:11 -04:00
Nick Mathewson
ac9f2adb45 Credit new contributors for 2.0.14-stable release-2.0.14-stable 2011-08-31 00:23:20 -04:00
Nick Mathewson
da90a9be69 Pick a release date for the changelog 2011-08-30 22:35:51 -04:00
Nick Mathewson
85976ddfa4 Bump version to 2.0.14-stable 2011-08-30 22:28:02 -04:00
Joachim Bauch
54f7e61ba3 clear read watermark on underlying bufferevent when creating filtering bev to fix potentially failing fragmented ssl handshakes 2011-08-29 17:50:34 -04:00
Nick Mathewson
6476d92d10 Checkpoint changelog entries for 2.0.14-stable 2011-08-29 13:40:03 -04:00
Nick Mathewson
e6af35d762 Correctly terminate IO on an async bufferevent on bufferevent_free 2011-08-28 14:39:12 -04:00
Nick Mathewson
0ff2c5a922 Have test-ratelim.c support IOCP 2011-08-28 14:39:12 -04:00
Nick Mathewson
a98da7bfc9 Make IOCP rate-limiting group support stricter and less surprising.
Previously, we wouldn't decrement read/write buckets because of IOCP
reads and writes until those reads and writes were complete.  That's
not so bad on the per-connection front.  But for group limits, the
old approach makes us launch a huge amount of reads and writes
whenever the group limit becomes positive, and then decrement the
limit to a hugely negative number as they complete.

With this patch, we decrement our read buckets whenever we launch an
IOCP read or write, based on the maximum that tried to read or
write.  Later, when the operations finish, we re-increment the
bucket based on the portion of the request that couldn't finish.
2011-08-28 14:39:11 -04:00
Nick Mathewson
c75341b077 Support negative arguments to _bufferevent_decrement_(read/write)_buckets() 2011-08-28 14:39:11 -04:00
Nick Mathewson
2f51dc0311 Cleanup on 7c11e51e1ab: fix strtol usage 2011-08-28 14:03:10 -04:00
Nick Mathewson
6056d6e0df Cleanup on 7c11e51e1ab: restore c90 declaration compliance 2011-08-28 14:02:40 -04:00
Harlan Stenn
7c11e51e1a Clean up some problems identified by Coverity. 2011-08-28 13:44:33 -04:00
Nick Mathewson
5b18f13048 Make rate limiting work with common_timeout logic 2011-08-24 16:17:05 -04:00
Nick Mathewson
6736852eaa Merge branch '20_iocp_fixes' into patches-2.0 2011-08-18 15:09:44 -04:00
Nick Mathewson
6acfbdd83a Make overlapped reads result in evbuffer callbacks getting invoked 2011-08-18 13:15:46 -04:00
Nick Mathewson
495c227f59 IOCP: don't launch reads or writes on an unconnected socket 2011-08-18 11:41:55 -04:00
Dave Hart
04656ea85a Try to fix 'make distcheck' errors when building out-of-tree 2011-08-17 22:04:38 -04:00