Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redsocks_evbuffer_readline with libevent 2.1 #123

Open
wants to merge 1 commit into
base: master
from

Conversation

@apoikos
Copy link
Contributor

@apoikos apoikos commented Mar 29, 2018

_EVENT_NUMERIC_VERSION was renamed to EVENT__NUMERIC_VERSION in libevent
2.1. As a result, redsocks_evbuffer_readline would end up using
evbuffer_readline(buf), which causes client connections to hang
indefinitely.

Switch the check to using LIBEVENT_VERSION_NUMBER instead.
LIBEVENT_VERSION_NUMBER has been around since libevent 2.0.3 and
redsocks is already using it in other parts of the code.

Fixes #107, #122.

_EVENT_NUMERIC_VERSION was renamed to EVENT__NUMERIC_VERSION in libevent
2.1. As a result, redsocks_evbuffer_readline would end up using
evbuffer_readline(buf), which causes client connections to hang
indefinitely.

Switch the check to using LIBEVENT_VERSION_NUMBER instead.
LIBEVENT_VERSION_NUMBER has been around since libevent 2.0.3 and
redsocks is already using it in other parts of the code.

Fixes #107, #122.
imrehg added a commit to balena-os/meta-balena that referenced this pull request Apr 2, 2018
Current version of redsocks cannot use libevent 2.1.x because of a breaking
change, and that results in the `http-connect` (and possibly other)
opreation is broken.

This commit pulls in a proposed patch from redsocks:
darkk/redsocks#123

Change-type: patch
Changelog-entry: Apply upstream patch for redsocks to fix http-config regression
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
imrehg added a commit to balena-os/meta-balena that referenced this pull request Apr 2, 2018
Current version of redsocks cannot use libevent 2.1.x because of a breaking
change, and that results in the `http-connect` (and possibly other)
operation being broken (regression since meta-resin 2.10.0)

This commit pulls in a proposed patch from redsocks:
darkk/redsocks#123

Change-type: patch
Changelog-entry: Apply upstream patch for redsocks to fix http-config regression
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
agherzan added a commit to balena-os/meta-balena that referenced this pull request Apr 3, 2018
Current version of redsocks cannot use libevent 2.1.x because of a breaking
change, and that results in the `http-connect` (and possibly other)
operation being broken (regression since meta-resin 2.10.0)

This commit pulls in a proposed patch from redsocks:
darkk/redsocks#123

Change-type: patch
Changelog-entry: Apply upstream patch for redsocks to fix http-config regression
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
@houtmanj
Copy link

@houtmanj houtmanj commented Apr 13, 2018

This change fixed my issue on archlinux with redsocks and libevent 2.1. Works like a charm now

@agherzan
Copy link

@agherzan agherzan commented Apr 17, 2018

Any chance we can get this in soon?

Zrubi added a commit to Zrubi/redsocks that referenced this pull request Jun 14, 2018
@matlec
Copy link

@matlec matlec commented Nov 19, 2018

I spent some time debugging this problem until I fixed the problem in my local source tree and discovered this issue. Please merge the pull request proposed by @apoikos, otherwise Redsocks is not usable with http-connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants