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 #1

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

dorsegal
Copy link
Owner

_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 darkk#107, darkk#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 darkk#107, darkk#122.
@dorsegal dorsegal merged commit cb2fa72 into dorsegal:master Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libevent 2.1.*
2 participants