]> granicus.if.org Git - libevent/log
libevent
10 years agoevhttp: Fix failure to send all output data for POST/PUT requests
John Ohl [Mon, 24 Nov 2014 07:32:23 +0000 (02:32 -0500)]
evhttp: Fix failure to send all output data for POST/PUT requests

10 years agoMerge pull request #179 from pysiak/master
Nick Mathewson [Mon, 13 Oct 2014 21:59:32 +0000 (17:59 -0400)]
Merge pull request #179 from pysiak/master

Provide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT

10 years agoProvide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT
Maciej Soltysiak [Mon, 13 Oct 2014 15:28:14 +0000 (17:28 +0200)]
Provide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT

10 years agoMerge pull request #174 from azat/dns-fail-disable-when-inactive-fix-v3
Nick Mathewson [Thu, 9 Oct 2014 15:48:38 +0000 (11:48 -0400)]
Merge pull request #174 from azat/dns-fail-disable-when-inactive-fix-v3

Dns fail disable when inactive fix v3

10 years agoMerge pull request #171 from azat/bufferevent-openssl-fixes-v4
Nick Mathewson [Thu, 9 Oct 2014 15:30:01 +0000 (11:30 -0400)]
Merge pull request #171 from azat/bufferevent-openssl-fixes-v4

bufferevent_openssl: reset fd_is_set when setfd with -1 is called

10 years agoMerge pull request #170 from azat/https-client-retries
Nick Mathewson [Thu, 9 Oct 2014 15:29:17 +0000 (11:29 -0400)]
Merge pull request #170 from azat/https-client-retries

https-client: add -retries argument, for connection retries

10 years agoMerge pull request #108 from JoakimSoderberg/minor_issues
Nick Mathewson [Thu, 9 Oct 2014 14:42:20 +0000 (10:42 -0400)]
Merge pull request #108 from JoakimSoderberg/minor_issues

Fix compilation for older OpenSSL versions.

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 9 Oct 2014 14:14:30 +0000 (10:14 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years agoFix a typo in a doxygen comment. Reported by 亦得.
Nick Mathewson [Thu, 9 Oct 2014 14:14:12 +0000 (10:14 -0400)]
Fix a typo in a doxygen comment. Reported by 亦得.

10 years agoevdns: fail ns after we are failing/retrasmitting request
Azat Khuzhin [Mon, 29 Sep 2014 21:34:04 +0000 (01:34 +0400)]
evdns: fail ns after we are failing/retrasmitting request

In case we are failing request (evdns_request_timeout_callback()), we
delete timeout_event in request_finished(), while just before calling
request_finished() (for failing request) there was a call to
nameserver_failed(), that add event for timeout_event, IOW we must fail
ns after request because otherwise we will not have timeout_event
actived, and we will waiting forever.

Before this patch the dns/retry_disable_when_inactive will wait forever,
after - OK.

10 years agoevdns: add retry/reissue tests for EVDNS_BASE_DISABLE_WHEN_INACTIVE
Azat Khuzhin [Thu, 10 Apr 2014 15:33:45 +0000 (19:33 +0400)]
evdns: add retry/reissue tests for EVDNS_BASE_DISABLE_WHEN_INACTIVE

10 years agoevdns: fix EVDNS_BASE_DISABLE_WHEN_INACTIVE in case retransmit/retry
Azat Khuzhin [Thu, 10 Apr 2014 15:30:47 +0000 (19:30 +0400)]
evdns: fix EVDNS_BASE_DISABLE_WHEN_INACTIVE in case retransmit/retry

10 years agoFix compilation for older OpenSSL versions.
Joakim Soderberg [Wed, 24 Sep 2014 11:46:09 +0000 (13:46 +0200)]
Fix compilation for older OpenSSL versions.

For instance OpenSSL 0.9.7 does not have SSL_set_tlsext_host_name.

Also add the missing EVENT__DISABLE_SAMPLES CMake option.

10 years agobufferevent_openssl: reset fd_is_set when setfd with -1 is called
Azat Khuzhin [Sun, 21 Sep 2014 14:29:17 +0000 (18:29 +0400)]
bufferevent_openssl: reset fd_is_set when setfd with -1 is called

Otherwise we will use old fd after close(2) called on it:
(Traces trimmed, to minimize it)
$ strace -keclose,open,socket,epoll_ctl https-client -url https://libevent.org
socket(PF_INET, SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_IP) = 5
 > /lib/x86_64-linux-gnu/libc-2.19.so(socket+0x7) [0xe6da7]
 > /usr/lib/libevent-2.1.so.4.0.0(evutil_socket_+0x25) [0x27835]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect+0xe9) [0x1b1a9]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect+0x21f) [0x1b2df]
 > /usr/lib/libevent-2.1.so.4.0.0(evutil_getaddrinfo_async_+0x65) [0x271a5]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect_hostname+0x106) [0x1b416]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_connect_+0xe7) [0x39f07]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_make_request+0xb8) [0x3a218]
epoll_ctl(3, EPOLL_CTL_ADD, 5, {EPOLLIN, {u32=5, u64=5}}) = 0
 > ...
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xfdd) [0x2ced]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_setfd+0x3b) [0x16d9b]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect+0x75) [0x1b135]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect+0x21f) [0x1b2df]
 > /usr/lib/libevent-2.1.so.4.0.0(evutil_getaddrinfo_async_+0x65) [0x271a5]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect_hostname+0x106) [0x1b416]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_connect_+0xe7) [0x39f07]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_make_request+0xb8) [0x3a218]
epoll_ctl(3, EPOLL_CTL_MOD, 5, {EPOLLIN|EPOLLOUT, {u32=5, u64=5}}) = 0
 > ...
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xfee) [0x2cfe]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_setfd+0x3b) [0x16d9b]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect+0x75) [0x1b135]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect+0x21f) [0x1b2df]
 > /usr/lib/libevent-2.1.so.4.0.0(evutil_getaddrinfo_async_+0x65) [0x271a5]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_socket_connect_hostname+0x106) [0x1b416]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_connect_+0xe7) [0x39f07]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_make_request+0xb8) [0x3a218]
epoll_ctl(3, EPOLL_CTL_MOD, 5, {EPOLLOUT, {u32=5, u64=5}}) = 0
 > ...
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xbbc) [0x28cc]
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xd96) [0x2aa6]
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xeb8) [0x2bc8]
 > /usr/lib/libevent-2.1.so.4.0.0(event_free+0x3fe) [0x1fd1e]
 > /usr/lib/libevent-2.1.so.4.0.0(event_base_loop+0x407) [0x20677]
epoll_ctl(3, EPOLL_CTL_DEL, 5, 7fffa1f841e0) = 0
 > ...
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xbc4) [0x28d4]
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xd96) [0x2aa6]
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xeb8) [0x2bc8]
 > /usr/lib/libevent-2.1.so.4.0.0(event_free+0x3fe) [0x1fd1e]
 > /usr/lib/libevent-2.1.so.4.0.0(event_base_loop+0x407) [0x20677]
close(5)                                = 0
 > /lib/x86_64-linux-gnu/libpthread-2.19.so(__close_nocancel+0x7) [0xeb20]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_reset_+0x55) [0x373f5]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_connect_+0x1d) [0x39e3d]
 > /usr/lib/libevent-2.1.so.4.0.0(event_free+0x3fe) [0x1fd1e]
 > /usr/lib/libevent-2.1.so.4.0.0(event_base_loop+0x407) [0x20677]
epoll_ctl(3, EPOLL_CTL_ADD, 5, {EPOLLIN, {u32=5, u64=5}}) = -1 EBADF (Bad file descriptor)
) = -1 EBADF (Bad file descriptor)
/src/oss/strace-code/strace: Can't initiate libunwind: No such process
 > ...
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xfdd) [0x2ced]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_setfd+0x3b) [0x16d9b]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_connect_+0x14c) [0x39f6c]
 > /usr/lib/libevent-2.1.so.4.0.0(event_free+0x3fe) [0x1fd1e]
 > /usr/lib/libevent-2.1.so.4.0.0(event_base_loop+0x407) [0x20677]
/src/oss/strace-code/strace: Exit of unknown pid 28185 seen
[warn] Epoll ADD(1) on fd 5 failed.  Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
epoll_ctl(3, EPOLL_CTL_ADD, 5, {EPOLLOUT, {u32=5, u64=5}}) = -1 EBADF (Bad file descriptor)
) = -1 EBADF (Bad file descriptor)
/src/oss/strace-code/strace: Can't initiate libunwind: No such process
 > ...
 > /usr/lib/libevent_openssl-2.1.so.4.0.0(_init+0xfee) [0x2cfe]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_setfd+0x3b) [0x16d9b]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_connect_+0x14c) [0x39f6c]
 > /usr/lib/libevent-2.1.so.4.0.0(event_free+0x3fe) [0x1fd1e]
 > /usr/lib/libevent-2.1.so.4.0.0(event_base_loop+0x407) [0x20677]
/src/oss/strace-code/strace: Exit of unknown pid 28186 seen
[warn] Epoll ADD(4) on fd 5 failed.  Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
<getaddrinfo traces trimmed>
close(5)                                = -1 EBADF (Bad file descriptor)
)                                = -1 EBADF (Bad file descriptor)
/src/oss/strace-code/strace: Can't initiate libunwind: No such process
 > /lib/x86_64-linux-gnu/libpthread-2.19.so(__close_nocancel+0x7) [0xeb20]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_reset_+0x55) [0x373f5]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_fail_+0xc1) [0x3aed1]
 > /usr/lib/libevent-2.1.so.4.0.0(evhttp_connection_fail_+0x4a3) [0x3b2b3]
 > /usr/lib/libevent-2.1.so.4.0.0(bufferevent_enable+0x192) [0x16722]
 > /usr/lib/libevent-2.1.so.4.0.0(event_free+0x5df) [0x1feff]
 > /usr/lib/libevent-2.1.so.4.0.0(event_base_loop+0x407) [0x20677]
/src/oss/strace-code/strace: Exit of unknown pid 28187 seen
some request failed - no idea which one though!
socket error = Bad file descriptor (9)

Before this patch:
$ sample/https-client -retries 1 -url https://libevent.org
[warn] Epoll ADD(1) on fd 6 failed.  Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
[warn] Epoll ADD(4) on fd 6 failed.  Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
some request failed - no idea which one though!
socket error = Bad file descriptor (9)

After this patch:
$ sample/https-client -retries 1 -url https://libevent.org
Response line: 0 (null)

Reported-by: gerkenjohannes@web.de
10 years agohttps-client: add -retries argument, for connection retries
Azat Khuzhin [Sun, 21 Sep 2014 14:36:29 +0000 (18:36 +0400)]
https-client: add -retries argument, for connection retries

Using evhttp_connection_set_retries() API.

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 18 Sep 2014 19:08:57 +0000 (15:08 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years ago[Bugfix] fix bufferevent setwatermark suspend_read
ufo2243 [Fri, 12 Sep 2014 06:19:14 +0000 (14:19 +0800)]
[Bugfix] fix bufferevent setwatermark suspend_read

10 years agoFix several memory leaks in the unit tests.
Nick Mathewson [Thu, 18 Sep 2014 16:40:38 +0000 (12:40 -0400)]
Fix several memory leaks in the unit tests.

Also add a comment to buffer.c about why we call
evbuffer_file_segment_free on failure to add the segment.

10 years agoFix for a677b72bd6d9d378daf9775966aa8ca574e26e67
Nick Mathewson [Thu, 18 Sep 2014 16:12:36 +0000 (12:12 -0400)]
Fix for a677b72bd6d9d378daf9775966aa8ca574e26e67

10 years agoMake a buffer larger in the tests to avoid a scary evbuffer_copyout_from()
Nick Mathewson [Thu, 18 Sep 2014 16:08:50 +0000 (12:08 -0400)]
Make a buffer larger in the tests to avoid a scary evbuffer_copyout_from()

The call was safe, but coverity couldn't tell. CID 1239294.

10 years agoUse a more precise calculation for max in time-ratelim.c
Nick Mathewson [Thu, 18 Sep 2014 16:04:16 +0000 (12:04 -0400)]
Use a more precise calculation for max in time-ratelim.c

CID 1239297

10 years agoUse evutil_weakrand() in unit tests.
Nick Mathewson [Thu, 18 Sep 2014 16:02:13 +0000 (12:02 -0400)]
Use evutil_weakrand() in unit tests.

(Coverity doesn't like random() or rand().  We don't care; this is
for unit tests.)

Fixes CID 1239298123929612392951239293.

10 years agoFix a c90 warning
Nick Mathewson [Thu, 18 Sep 2014 15:54:39 +0000 (11:54 -0400)]
Fix a c90 warning

10 years agoFix a dead-code warning in unit tests. CID 1193548
Nick Mathewson [Thu, 18 Sep 2014 15:54:04 +0000 (11:54 -0400)]
Fix a dead-code warning in unit tests. CID 1193548

10 years agoFix a use-after-free in unit tests. CID 752027
Nick Mathewson [Thu, 18 Sep 2014 15:52:16 +0000 (11:52 -0400)]
Fix a use-after-free in unit tests. CID 752027

10 years agoMerge pull request #168 from ufo2243/master
Nick Mathewson [Thu, 18 Sep 2014 15:44:11 +0000 (11:44 -0400)]
Merge pull request #168 from ufo2243/master

make bufferevent_getwatermark api more robust

10 years agoMerge pull request #119 from ldx/winhosts
Nick Mathewson [Thu, 18 Sep 2014 15:41:18 +0000 (11:41 -0400)]
Merge pull request #119 from ldx/winhosts

Fix hosts file use on Windows.

10 years agoFix use-after-free error in EV_CLOSURE_EVENT callback
John Ohl [Wed, 17 Sep 2014 02:25:52 +0000 (22:25 -0400)]
Fix use-after-free error in EV_CLOSURE_EVENT callback

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 18 Sep 2014 15:36:08 +0000 (11:36 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years agoregress_buffer: fix 'memcmp' compare size
Maks Naumov [Tue, 25 Mar 2014 11:35:13 +0000 (13:35 +0200)]
regress_buffer: fix 'memcmp' compare size

10 years agoMerge pull request #118 from azat/http-forward-family-to-bufferevent
Nick Mathewson [Thu, 18 Sep 2014 15:31:52 +0000 (11:31 -0400)]
Merge pull request #118 from azat/http-forward-family-to-bufferevent

Add evhttp_connection_set_family() to set addrinfo->family for DNS requests

10 years agouse correct tt macro for pointer compare
Nick Mathewson [Thu, 18 Sep 2014 15:28:19 +0000 (11:28 -0400)]
use correct tt macro for pointer compare

10 years agoMerge pull request #128 from azat/tests-disable-when-inactive-v5
Nick Mathewson [Thu, 18 Sep 2014 15:25:27 +0000 (11:25 -0400)]
Merge pull request #128 from azat/tests-disable-when-inactive-v5

Some tests for EVDNS_BASE_DISABLE_WHEN_INACTIVE flag

10 years agoMerge pull request #129 from azat/disable-probing-with-disable-when-inactive-v2
Nick Mathewson [Thu, 18 Sep 2014 15:24:56 +0000 (11:24 -0400)]
Merge pull request #129 from azat/disable-probing-with-disable-when-inactive-v2

evdns: disable probing with EVDNS_BASE_DISABLE_WHEN_INACTIVE

10 years agomake bufferevent_getwatermark api more robust
ufo2243 [Fri, 12 Sep 2014 03:51:59 +0000 (11:51 +0800)]
make bufferevent_getwatermark api more robust

10 years agoMerge pull request #167 from snikulov/pr_libevent_cmake_upd
Nick Mathewson [Mon, 8 Sep 2014 19:37:31 +0000 (15:37 -0400)]
Merge pull request #167 from snikulov/pr_libevent_cmake_upd

updates in cmake build

10 years agoMerge pull request #103 from ufo2243/master
Nick Mathewson [Wed, 3 Sep 2014 13:29:59 +0000 (09:29 -0400)]
Merge pull request #103 from ufo2243/master

[Bugfix] fix grammer error

10 years ago[Bugfix] fix grammer error
ufo2243 [Wed, 3 Sep 2014 02:55:27 +0000 (10:55 +0800)]
[Bugfix] fix grammer error

10 years agoupdates in cmake build
Sergey Nikulov [Tue, 2 Sep 2014 14:25:52 +0000 (18:25 +0400)]
updates in cmake build

10 years agoCorrectly handle allocation failures in evdns_getaddrinfo
Nick Mathewson [Fri, 29 Aug 2014 19:26:56 +0000 (15:26 -0400)]
Correctly handle allocation failures in evdns_getaddrinfo

Kuldeep Gupta appears to have used some kind of automated tool to
find this and generate a patch for half the issue as #149.

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 29 Aug 2014 19:00:33 +0000 (15:00 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years agoConsistently check for failure from evbuffer_pullup()
Nick Mathewson [Fri, 29 Aug 2014 18:59:17 +0000 (14:59 -0400)]
Consistently check for failure from evbuffer_pullup()

Closes issue #148.

10 years agoMerge pull request #153 from azat/tests-simplestsignal
Nick Mathewson [Fri, 29 Aug 2014 18:38:09 +0000 (14:38 -0400)]
Merge pull request #153 from azat/tests-simplestsignal

test/regress: add simplestsignal: to track reorder bugs separately

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 29 Aug 2014 18:32:10 +0000 (14:32 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
sample/http-server.c

10 years agoUse FindClose for handle from FindFirstFile in http-server.c
Nick Mathewson [Fri, 29 Aug 2014 18:31:07 +0000 (14:31 -0400)]
Use FindClose for handle from FindFirstFile in http-server.c

Noted by Miles Chan as issue #145

10 years agoChange return type of evutil_load_windows_system_library_ to HMODULE
Nick Mathewson [Fri, 29 Aug 2014 18:28:09 +0000 (14:28 -0400)]
Change return type of evutil_load_windows_system_library_ to HMODULE

Noted by Miles Chan as issue #146

10 years agoFix issue #127, double free for filterevents that use BEV_OPT_CLOSE_ON_FREE
John Ohl [Wed, 30 Apr 2014 17:55:49 +0000 (13:55 -0400)]
Fix issue #127, double free for filterevents that use BEV_OPT_CLOSE_ON_FREE

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 18 Aug 2014 14:14:29 +0000 (10:14 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years agoAdd a few files created by "make verify" to .gitignore.
Pierre Phaneuf [Wed, 13 Aug 2014 22:17:52 +0000 (23:17 +0100)]
Add a few files created by "make verify" to .gitignore.

10 years agotest/regress: add simplestsignal: to track reorder bugs separately
Azat Khuzhin [Sat, 22 Feb 2014 22:31:51 +0000 (02:31 +0400)]
test/regress: add simplestsignal: to track reorder bugs separately

10 years agoMerge pull request #140 from vapier/ignore
Nick Mathewson [Sun, 15 Jun 2014 03:44:47 +0000 (23:44 -0400)]
Merge pull request #140 from vapier/ignore

ignore config.cache/test-driver files

10 years agoMerge pull request #143 from vapier/disable-sample
Nick Mathewson [Sun, 15 Jun 2014 03:44:18 +0000 (23:44 -0400)]
Merge pull request #143 from vapier/disable-sample

add a --disable-samples configure flag

10 years agoadd a --disable-samples configure flag
Mike Frysinger [Fri, 13 Jun 2014 21:07:50 +0000 (17:07 -0400)]
add a --disable-samples configure flag

For people building & installing libevent in a distro, building all these
sample apps are not useful.  Add a flag to turn them off.

10 years agoignore config.cache/test-driver files
Mike Frysinger [Fri, 13 Jun 2014 18:18:13 +0000 (14:18 -0400)]
ignore config.cache/test-driver files

config.cache is generated when you run `./configure -C`.

test-driver comes from newer autotools.

10 years agoHandle ENOTCAPABLE from FreeBSD - this is returned if an event in the
Adrian Chadd [Sat, 7 Jun 2014 19:57:02 +0000 (12:57 -0700)]
Handle ENOTCAPABLE from FreeBSD - this is returned if an event in the
changelist is for an FD that has been closed.

10 years agoMake http-server.c output into good html5
Nick Mathewson [Fri, 30 May 2014 17:53:27 +0000 (13:53 -0400)]
Make http-server.c output into good html5

10 years agoUpdate to a more recent tinytest_macros.
Nick Mathewson [Thu, 8 May 2014 17:21:49 +0000 (13:21 -0400)]
Update to a more recent tinytest_macros.

This one has less of a tendency to suppress important type warnings.

10 years agoMerge pull request #132 from credil/master
Nick Mathewson [Mon, 14 Apr 2014 14:00:51 +0000 (10:00 -0400)]
Merge pull request #132 from credil/master

ignore one more test binary

10 years agoignore one more test binary
Michael Richardson [Sun, 13 Apr 2014 17:07:16 +0000 (13:07 -0400)]
ignore one more test binary

10 years agoregress dns: drop alarm() (since windows don't have it)
Azat Khuzhin [Fri, 11 Apr 2014 14:50:10 +0000 (18:50 +0400)]
regress dns: drop alarm() (since windows don't have it)

10 years agoevdns: we don't need to add retry timer in transmit_to it will be done on fail
Azat Khuzhin [Thu, 10 Apr 2014 15:45:31 +0000 (19:45 +0400)]
evdns: we don't need to add retry timer in transmit_to it will be done on fail

10 years agoevdns: add regress test for flag EVDNS_BASE_DISABLE_WHEN_INACTIVE without ns
Azat Khuzhin [Wed, 9 Apr 2014 21:11:42 +0000 (01:11 +0400)]
evdns: add regress test for flag EVDNS_BASE_DISABLE_WHEN_INACTIVE without ns

10 years agoevdns: add regress for EVDNS_BASE_DISABLE_WHEN_INACTIVE base flag
Azat Khuzhin [Wed, 9 Apr 2014 13:48:12 +0000 (17:48 +0400)]
evdns: add regress for EVDNS_BASE_DISABLE_WHEN_INACTIVE base flag

10 years agoevdns: disable probing with EVDNS_BASE_DISABLE_WHEN_INACTIVE
Azat Khuzhin [Fri, 21 Mar 2014 13:04:58 +0000 (17:04 +0400)]
evdns: disable probing with EVDNS_BASE_DISABLE_WHEN_INACTIVE

When user install EVDNS_BASE_DISABLE_WHEN_INACTIVE flag for evdns base,
we must remove the timer that is used for probing, if current dns server
failed, otherwise it won't break the loop.

10 years agoMerge pull request #125 from azat/tree.h-drop-copy
Nick Mathewson [Mon, 31 Mar 2014 15:50:30 +0000 (11:50 -0400)]
Merge pull request #125 from azat/tree.h-drop-copy

tree.h: drop duplicated content of tree.h

10 years agotree.h: drop duplicated content of tree.h
Azat Khuzhin [Fri, 28 Mar 2014 16:44:09 +0000 (20:44 +0400)]
tree.h: drop duplicated content of tree.h

Introduced in 9859bc783adcd51729b3d7563902ac8caca67b42
("r15764@tombo:  nickm | 2007-12-31 15:46:16 -0500")

10 years agotest/http: add regress test for set family to AF_INET6
Azat Khuzhin [Wed, 26 Mar 2014 20:49:00 +0000 (00:49 +0400)]
test/http: add regress test for set family to AF_INET6

10 years agotest: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC
Azat Khuzhin [Wed, 26 Mar 2014 20:40:14 +0000 (00:40 +0400)]
test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC

10 years agotest: add family argument for http_connection_test_()
Azat Khuzhin [Wed, 26 Mar 2014 20:44:51 +0000 (00:44 +0400)]
test: add family argument for http_connection_test_()

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 26 Mar 2014 15:10:16 +0000 (11:10 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years agoFix a crash in evdns related to shutting down evdns
Nick Mathewson [Fri, 21 Mar 2014 18:08:17 +0000 (14:08 -0400)]
Fix a crash in evdns related to shutting down evdns

(Improved version to deal correctly with probe requests)

Patch from YASUOKA Masahiko; fix for libevent github issue #113.

10 years agoMerge pull request #121 from azat/dns-regress-leaks
Nick Mathewson [Wed, 26 Mar 2014 15:02:52 +0000 (11:02 -0400)]
Merge pull request #121 from azat/dns-regress-leaks

regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests

10 years agoMerge pull request #122 from trondn/missing-file
Nick Mathewson [Wed, 26 Mar 2014 14:51:17 +0000 (10:51 -0400)]
Merge pull request #122 from trondn/missing-file

Add missing headerfile for cmake

10 years agoAdd missing headerfile for cmake
Trond Norbye [Mon, 24 Mar 2014 14:01:02 +0000 (15:01 +0100)]
Add missing headerfile for cmake

10 years agoregress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests
Azat Khuzhin [Sun, 23 Mar 2014 11:12:29 +0000 (15:12 +0400)]
regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests

10 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 21 Mar 2014 18:09:54 +0000 (14:09 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

10 years agoFix a crash in evdns related to shutting down evdns
Nick Mathewson [Fri, 21 Mar 2014 18:08:17 +0000 (14:08 -0400)]
Fix a crash in evdns related to shutting down evdns

Patch from YASUOKA Masahiko; fix for libevent github issue #113.

10 years agoIncrement version to 2.1.4-alpha-dev
Nick Mathewson [Fri, 21 Mar 2014 17:20:34 +0000 (13:20 -0400)]
Increment version to 2.1.4-alpha-dev

10 years agoUpdate release date in changelog
Nick Mathewson [Fri, 21 Mar 2014 16:33:13 +0000 (12:33 -0400)]
Update release date in changelog

10 years agoMerge pull request #116 from trondn/cmake-build-fixes release-2.1.4-alpha
Nick Mathewson [Fri, 21 Mar 2014 15:45:31 +0000 (11:45 -0400)]
Merge pull request #116 from trondn/cmake-build-fixes

Cmake build fixes

10 years agoDon't truncate hosts file path on Windows.
Vilmos Nebehaj [Fri, 21 Mar 2014 13:38:11 +0000 (14:38 +0100)]
Don't truncate hosts file path on Windows.

Since evutil_snprintf() (actually evutil_vsnprintf() called by it) will
make sure the buffer is null-terminated by placing a null byte at
len_out - 1, we need to pass the full length of the buffer; otherwise
the path will end in "\\host" instead of "\\hosts".

10 years agoLoad hosts file on Windows.
Vilmos Nebehaj [Fri, 21 Mar 2014 13:36:15 +0000 (14:36 +0100)]
Load hosts file on Windows.

Hosts files are not loaded in evdns_base_config_windows_nameservers() if
load_nameservers_with_getnetworkparams() succeeds on Windows. Parse and
load it first before setting up nameservers.

10 years agoAdd evhttp_connection_set_family() to set addrinfo->family for DNS requests
Azat Khuzhin [Fri, 21 Mar 2014 13:32:09 +0000 (17:32 +0400)]
Add evhttp_connection_set_family() to set addrinfo->family for DNS requests

This is useful if you want to avoid extra dns requests.

10 years agoFixup make install for cmake projects
Trond Norbye [Fri, 21 Mar 2014 11:12:10 +0000 (12:12 +0100)]
Fixup make install for cmake projects

Install all of the public headers and put the dll's in the
same directory as the binaries.

10 years agoRenamed sin to saddr due to name conflict
Trond Norbye [Fri, 21 Mar 2014 10:59:55 +0000 (11:59 +0100)]
Renamed sin to saddr due to name conflict

During building on MSVC 2013 I got a compiler error by a
type conflict for sin:

test-fdleak.c(60) : error C2365: 'sin' : redefinition; previous definition was 'function'
test-fdleak.c(134) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(134) : error C2198: 'evconnlistener_new_bind' : too few arguments for call
test-fdleak.c(148) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(148) : error C2168: 'memcpy' : too few actual parameters for intrinsic function
test-fdleak.c(149) : error C2224: left of '.sin_family' must have struct/union type
test-fdleak.c(212) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(212) : error C2198: 'bufferevent_socket_connect' : too few arguments for call
test-fdleak.c(239) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(239) : error C2168: 'memset' : too few actual parameters for intrinsic function
test-fdleak.c(240) : error C2224: left of '.sin_family' must have struct/union type
test-fdleak.c(241) : error C2224: left of '.sin_addr' must have struct/union type
test-fdleak.c(242) : error C2224: left of '.sin_port' must have struct/union type

The simplest solution to this problem would be to rename
the variable.

10 years agoCorrectly skip ipv6 http test on systems without ipv6
Nick Mathewson [Tue, 18 Mar 2014 22:36:32 +0000 (18:36 -0400)]
Correctly skip ipv6 http test on systems without ipv6

10 years agoRemove integer-overflow unit tests
Nick Mathewson [Tue, 18 Mar 2014 16:35:39 +0000 (12:35 -0400)]
Remove integer-overflow unit tests

There's not much point checking undefined behavior.

10 years agoevtag: detect tags over 32-bits earlier
Nick Mathewson [Tue, 18 Mar 2014 16:27:14 +0000 (12:27 -0400)]
evtag: detect tags over 32-bits earlier

10 years agoCatch over-large port numbers early in http
Nick Mathewson [Tue, 18 Mar 2014 15:39:23 +0000 (11:39 -0400)]
Catch over-large port numbers early in http

Otherwise integer overflow potentially turns the port number into garbage.

10 years agoFix ubsan warnings when parsing ipv4/ipv6 addrs
Nick Mathewson [Tue, 18 Mar 2014 15:35:50 +0000 (11:35 -0400)]
Fix ubsan warnings when parsing ipv4/ipv6 addrs

left-shifting a one-byte integer by 24 invokes undefined behavior.
Let's not do that.

10 years agoFix a use-after-free error on EV_CLOSURE_EVENT_FINALIZE callbacks
Nick Mathewson [Tue, 18 Mar 2014 15:25:58 +0000 (11:25 -0400)]
Fix a use-after-free error on EV_CLOSURE_EVENT_FINALIZE callbacks

After running the callback, we were checking evcb->evcb_closure to
decide whether to call mm_free(ev).  But the callback itself might
have freed ev, so we need to grab that field first

Found with AddressSanitizer

10 years agoFix an illegal read error in the evbuffer_add_reference tests
Nick Mathewson [Tue, 18 Mar 2014 15:13:45 +0000 (11:13 -0400)]
Fix an illegal read error in the evbuffer_add_reference tests

Found with AddressSanitizer

10 years agoAdd new APIs to whatsnew-2.1
Nick Mathewson [Mon, 17 Mar 2014 01:44:43 +0000 (21:44 -0400)]
Add new APIs to whatsnew-2.1

10 years agoIncrement version to 2.1.4-alpha
Nick Mathewson [Sun, 16 Mar 2014 16:09:24 +0000 (12:09 -0400)]
Increment version to 2.1.4-alpha

10 years agoBring changelog up to date for 2.1.4-alpha
Nick Mathewson [Sun, 16 Mar 2014 16:01:44 +0000 (12:01 -0400)]
Bring changelog up to date for 2.1.4-alpha

10 years agoAvoid double-close paths in http tests
Nick Mathewson [Thu, 13 Mar 2014 14:46:59 +0000 (10:46 -0400)]
Avoid double-close paths in http tests

Coverity spotted that there were some paths through the test
functions that would double-close some sockets.

10 years agoAdd missing include to regress_finalize.h
Nick Mathewson [Wed, 12 Mar 2014 22:19:07 +0000 (18:19 -0400)]
Add missing include to regress_finalize.h

10 years agoSkip http/ipv6_for_domain test when we have no ipv6 support
Nick Mathewson [Wed, 12 Mar 2014 22:13:19 +0000 (18:13 -0400)]
Skip http/ipv6_for_domain test when we have no ipv6 support

10 years agoAdd an include to evrpc-internal to fix openbsd compilation warning
Nick Mathewson [Wed, 12 Mar 2014 22:12:43 +0000 (18:12 -0400)]
Add an include to evrpc-internal to fix openbsd compilation warning

10 years agoHeap-allocate zlib data structure in regress_zlib tests
Nick Mathewson [Wed, 12 Mar 2014 18:29:15 +0000 (14:29 -0400)]
Heap-allocate zlib data structure in regress_zlib tests