[arch-commits] Commit in curl/trunk (2 files)
Christian Hesse
eworm at archlinux.org
Mon Mar 9 13:50:38 UTC 2020
Date: Monday, March 9, 2020 @ 13:50:37
Author: eworm
Revision: 377213
upgpkg: curl 7.69.0-5
fix resolver with socks4 (FS#65752)
Added:
curl/trunk/0004-socks4-fix-host-resolve-regression.patch
Modified:
curl/trunk/PKGBUILD
-----------------------------------------------+
0004-socks4-fix-host-resolve-regression.patch | 43 ++++++++++++++++++++++++
PKGBUILD | 9 +++--
2 files changed, 49 insertions(+), 3 deletions(-)
Added: 0004-socks4-fix-host-resolve-regression.patch
===================================================================
--- 0004-socks4-fix-host-resolve-regression.patch (rev 0)
+++ 0004-socks4-fix-host-resolve-regression.patch 2020-03-09 13:50:37 UTC (rev 377213)
@@ -0,0 +1,43 @@
+From f0e81605451b363617889820e17a35c262fdee78 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Sun, 8 Mar 2020 17:24:50 +0100
+Subject: [PATCH] socks4: fix host resolve regression
+
+1. The socks4 state machine was broken in the host resolving phase
+
+2. The code now insists on IPv4-only when using SOCKS4 as the protocol
+only supports that.
+
+Regression from #4907 and 4a4b63d, shipped in 7.69.0
+
+Reported-by: amishmm on github
+Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
+Closes #5061
+---
+ lib/socks.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/socks.c b/lib/socks.c
+index 754726f6fb8..37099130e5d 100644
+--- a/lib/socks.c
++++ b/lib/socks.c
+@@ -205,6 +205,8 @@ CURLcode Curl_SOCKS4(const char *proxy_user,
+
+ switch(sx->state) {
+ case CONNECT_SOCKS_INIT:
++ /* SOCKS4 can only do IPv4, insist! */
++ conn->ip_version = CURL_IPRESOLVE_V4;
+ if(conn->bits.httpproxy)
+ infof(conn->data, "SOCKS4%s: connecting to HTTP proxy %s port %d\n",
+ protocol4a ? "a" : "", hostname, remote_port);
+@@ -261,8 +263,8 @@ CURLcode Curl_SOCKS4(const char *proxy_user,
+ }
+ else {
+ result = Curl_resolv_check(data->conn, &dns);
+- /* stay in the state or error out */
+- return result;
++ if(!dns)
++ return result;
+ }
+ /* FALLTHROUGH */
+ CONNECT_RESOLVED:
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-03-09 11:37:11 UTC (rev 377212)
+++ PKGBUILD 2020-03-09 13:50:37 UTC (rev 377213)
@@ -6,7 +6,7 @@
pkgname=curl
pkgver=7.69.0
-pkgrel=4
+pkgrel=5
pkgdesc="An URL retrieval utility and library"
arch=('x86_64')
url="https://curl.haxx.se"
@@ -17,12 +17,14 @@
source=("https://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc}
0001-Revert-pause-force-drain-the-transfer-on-unpause.patch
0002-pause-force-a-connection-re-check-after-unpausing.patch
- 0003-pause-return-early-for-calls-that-don-t-change-pause-state.patch)
+ 0003-pause-return-early-for-calls-that-don-t-change-pause-state.patch
+ 0004-socks4-fix-host-resolve-regression.patch)
sha512sums=('0ecd9e6e55cb19400fafdcd723c72667903ec760652e60fe0b884a672e1ac5d8667c8837422145a9af995ffe36d31a2685296f272ebddf1f5f1a7b12baf0fbad'
'SKIP'
'6aaafcb580f88c715a294ea7b53877a405a4f6c4a338d830380a5c97a324268a287c893ee6fd24c3b69dc0566275336ec74c3816f2202e12d39840360d6784f0'
'bc384dcfef4f6ca8d52171b97d5979c5b043e70d756836f87449ea0108d9615521408fa71c330c4b627738978eacd24de80a0e93438532a8f48a4d049e83334e'
- '743b646307021d3d96146c30e18379253364b2b228e319377bc3300f0dac6dcac36ed347139028e346091eea98521ffd134f54bc809bddb61d45d400d50d875d')
+ '743b646307021d3d96146c30e18379253364b2b228e319377bc3300f0dac6dcac36ed347139028e346091eea98521ffd134f54bc809bddb61d45d400d50d875d'
+ 'd1c24632409852026ced30fd38d302b4c48778290c61c15af7bd2fc00f4862bfb910a9b38575082074f8b97e6a618d63a64a8cb6a578b51f3a23fbb43fed4a69')
validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
prepare() {
@@ -31,6 +33,7 @@
patch -Np1 <../0001-Revert-pause-force-drain-the-transfer-on-unpause.patch
patch -Np1 <../0002-pause-force-a-connection-re-check-after-unpausing.patch
patch -Np1 <../0003-pause-return-early-for-calls-that-don-t-change-pause-state.patch
+ patch -Np1 <../0004-socks4-fix-host-resolve-regression.patch
}
build() {
More information about the arch-commits
mailing list