]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: fix !no_signal mixup in resolve refaactor
authorStefan Eissing <stefan@eissing.org>
Sat, 21 Mar 2026 12:49:12 +0000 (13:49 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 21 Mar 2026 13:28:54 +0000 (14:28 +0100)
When extracting the resolve case using alarm timers, the check for "we
are not allowed to use signals" was refactored wrong.

Follow-up to 96d5b5c688c48a8f58ded1563ed0c

Closes #21047

lib/hostip.c
tests/http/test_06_eyeballs.py

index e8feb930dacf0879d5c831b167e3ae7d0471cb70..6406a850afb6d035644793e4f72435328d40ea52 100644 (file)
@@ -637,7 +637,7 @@ static CURLcode resolv_alarm_timeout(struct Curl_easy *data,
 
   DEBUGASSERT(hostname && *hostname);
   DEBUGASSERT(timeoutms > 0);
-  DEBUGASSERT(data->set.no_signal);
+  DEBUGASSERT(!data->set.no_signal);
 #ifndef CURL_DISABLE_DOH
   DEBUGASSERT(!data->set.doh);
 #endif
@@ -783,7 +783,7 @@ CURLcode Curl_resolv(struct Curl_easy *data,
     return CURLE_OPERATION_TIMEDOUT;
 
 #ifdef USE_ALARM_TIMEOUT
-  if(timeoutms && !data->set.no_signal) {
+  if(timeoutms && data->set.no_signal) {
     /* Cannot use ALARM when signals are disabled */
     timeoutms = 0;
   }
index 6129ab5f17559e8b2defab7a1381bad02e213a0a..96fa643270c2b5aa61b53a9efea55accbdfbdb54 100644 (file)
@@ -105,6 +105,8 @@ class TestEyeballs:
     # check timers when trying 3 unresponsive addresses
     @pytest.mark.skipif(condition=not Env.curl_has_feature('IPv6'),
                         reason='curl lacks ipv6 support')
+    @pytest.mark.skipif(condition=not Env.curl_has_feature('AsynchDNS'),
+                        reason='curl lacks async DNS support')
     @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
     def test_06_13_timers(self, env: Env):
         curl = CurlClient(env=env)