-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redsocks: patch to be able to use libevent 2.1.x
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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
meta-resin-common/recipes-connectivity/redsocks/files/0001-using-libevent-2_1_x.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From 792a06ba87621b3c9e921c7fd080cb350ff6892b Mon Sep 17 00:00:00 2001 | ||
From: Apollon Oikonomopoulos <[email protected]> | ||
Date: Thu, 29 Mar 2018 22:50:56 +0300 | ||
Subject: [PATCH] Fix redsocks_evbuffer_readline with libevent 2.1 | ||
|
||
_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. | ||
|
||
Upstream-Status: Pending | ||
|
||
--- | ||
utils.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/utils.c b/utils.c | ||
index 824d0cc..30ee290 100644 | ||
--- a/utils.c | ||
+++ b/utils.c | ||
@@ -117,7 +117,7 @@ int redsocks_gettimeofday(struct timeval *tv) | ||
|
||
char *redsocks_evbuffer_readline(struct evbuffer *buf) | ||
{ | ||
-#if _EVENT_NUMERIC_VERSION >= 0x02000000 | ||
+#if LIBEVENT_VERSION_NUMBER >= 0x02000000 | ||
return evbuffer_readln(buf, NULL, EVBUFFER_EOL_CRLF); | ||
#else | ||
return evbuffer_readline(buf); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters