Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4
@ 2023-11-07 12:41 Christian Hitz via buildroot
  2023-11-07 20:24 ` Marcus Hoffmann via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christian Hitz via buildroot @ 2023-11-07 12:41 UTC (permalink / raw)
  To: buildroot; +Cc: Christian Hitz

From: Christian Hitz <christian.hitz@bbv.ch>

This upstream patch restores the connectivity check functionality with
libcurl 8.4.

Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
---
Backport to: 2023.02.x, 2023.08.x
---
 ...-curl-timeout-callback-non-repeating.patch | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch

diff --git a/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch b/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
new file mode 100644
index 0000000000..8e25805d0c
--- /dev/null
+++ b/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
@@ -0,0 +1,44 @@
+From abc6e1cf258ab332bed161036a358bbe9c2d1e90 Mon Sep 17 00:00:00 2001
+From: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
+Date: Fri, 13 Oct 2023 16:46:09 +0000
+Subject: [PATCH] connectivity: Make curl timeout callback non-repeating.
+
+This reverts commit 05c31da4d9.
+
+In the linked commit the callback was made repeating on the assumption
+that forward progress would result in the callback getting canceled in
+cb_data_complete. However, this assumption does not hold since a timeout
+callback does not guarantee completion (or error out) of a request.
+
+curl tweaked some internals in v8.4.0 and started giving 0 timeouts, and
+a repeating callback is firing back-to-back without making any progress
+in doing so.
+
+Revert the change and make the callback non-repeating again.
+
+Fixes: 05c31da4d9cb ('connectivity: don't cancel curl timerfunction from timeout')
+Upstream: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/abc6e1cf258ab332bed161036a358bbe9c2d1e90
+Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
+---
+ src/core/nm-connectivity.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c
+index 92de44f17d..d8b0004c38 100644
+--- a/src/core/nm-connectivity.c
++++ b/src/core/nm-connectivity.c
+@@ -406,9 +406,10 @@ _con_curl_timeout_cb(gpointer user_data)
+ {
+     NMConnectivityCheckHandle *cb_data = user_data;
+ 
++    cb_data->concheck.curl_timer = 0;
+     _con_curl_check_connectivity(cb_data->concheck.curl_mhandle, CURL_SOCKET_TIMEOUT, 0);
+     _complete_queued(cb_data->self);
+-    return G_SOURCE_CONTINUE;
++    return G_SOURCE_REMOVE;
+ }
+ 
+ static int
+-- 
+GitLab
+
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4
  2023-11-07 12:41 [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4 Christian Hitz via buildroot
@ 2023-11-07 20:24 ` Marcus Hoffmann via buildroot
  2023-11-07 21:56 ` Yann E. MORIN
  2023-11-10 20:10 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Marcus Hoffmann via buildroot @ 2023-11-07 20:24 UTC (permalink / raw)
  To: Christian Hitz, buildroot; +Cc: Christian Hitz

On 07.11.23 13:41, Christian Hitz via buildroot wrote:
> From: Christian Hitz <christian.hitz@bbv.ch>
>
> This upstream patch restores the connectivity check functionality with
> libcurl 8.4.
>
> Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>

Reviewed-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>

> ---
> Backport to: 2023.02.x, 2023.08.x
> ---
>   ...-curl-timeout-callback-non-repeating.patch | 44 +++++++++++++++++++
>   1 file changed, 44 insertions(+)
>   create mode 100644 package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
>
> diff --git a/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch b/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
> new file mode 100644
> index 0000000000..8e25805d0c
> --- /dev/null
> +++ b/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
> @@ -0,0 +1,44 @@
> +From abc6e1cf258ab332bed161036a358bbe9c2d1e90 Mon Sep 17 00:00:00 2001
> +From: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
> +Date: Fri, 13 Oct 2023 16:46:09 +0000
> +Subject: [PATCH] connectivity: Make curl timeout callback non-repeating.
> +
> +This reverts commit 05c31da4d9.
> +
> +In the linked commit the callback was made repeating on the assumption
> +that forward progress would result in the callback getting canceled in
> +cb_data_complete. However, this assumption does not hold since a timeout
> +callback does not guarantee completion (or error out) of a request.
> +
> +curl tweaked some internals in v8.4.0 and started giving 0 timeouts, and
> +a repeating callback is firing back-to-back without making any progress
> +in doing so.
> +
> +Revert the change and make the callback non-repeating again.
> +
> +Fixes: 05c31da4d9cb ('connectivity: don't cancel curl timerfunction from timeout')
> +Upstream: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/abc6e1cf258ab332bed161036a358bbe9c2d1e90
> +Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
> +---
> + src/core/nm-connectivity.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c
> +index 92de44f17d..d8b0004c38 100644
> +--- a/src/core/nm-connectivity.c
> ++++ b/src/core/nm-connectivity.c
> +@@ -406,9 +406,10 @@ _con_curl_timeout_cb(gpointer user_data)
> + {
> +     NMConnectivityCheckHandle *cb_data = user_data;
> +
> ++    cb_data->concheck.curl_timer = 0;
> +     _con_curl_check_connectivity(cb_data->concheck.curl_mhandle, CURL_SOCKET_TIMEOUT, 0);
> +     _complete_queued(cb_data->self);
> +-    return G_SOURCE_CONTINUE;
> ++    return G_SOURCE_REMOVE;
> + }
> +
> + static int
> +--
> +GitLab
> +
________________________________

othermo GmbH | Sitz der Gesellschaft: Alzenau | Amtsgericht Aschaffenburg: HRB 14783 | USt-IdNr.: DE319977978 | Geschäftsführung: Dr. Dennis Metz.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4
  2023-11-07 12:41 [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4 Christian Hitz via buildroot
  2023-11-07 20:24 ` Marcus Hoffmann via buildroot
@ 2023-11-07 21:56 ` Yann E. MORIN
  2023-11-10 20:10 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2023-11-07 21:56 UTC (permalink / raw)
  To: Christian Hitz; +Cc: Christian Hitz, buildroot

Christian, All,

On 2023-11-07 13:41 +0100, Christian Hitz via buildroot spake thusly:
> From: Christian Hitz <christian.hitz@bbv.ch>
> 
> This upstream patch restores the connectivity check functionality with
> libcurl 8.4.
> 
> Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> Backport to: 2023.02.x, 2023.08.x
> ---
>  ...-curl-timeout-callback-non-repeating.patch | 44 +++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
> 
> diff --git a/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch b/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
> new file mode 100644
> index 0000000000..8e25805d0c
> --- /dev/null
> +++ b/package/network-manager/0001-connectivity-make-curl-timeout-callback-non-repeating.patch
> @@ -0,0 +1,44 @@
> +From abc6e1cf258ab332bed161036a358bbe9c2d1e90 Mon Sep 17 00:00:00 2001
> +From: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
> +Date: Fri, 13 Oct 2023 16:46:09 +0000
> +Subject: [PATCH] connectivity: Make curl timeout callback non-repeating.
> +
> +This reverts commit 05c31da4d9.
> +
> +In the linked commit the callback was made repeating on the assumption
> +that forward progress would result in the callback getting canceled in
> +cb_data_complete. However, this assumption does not hold since a timeout
> +callback does not guarantee completion (or error out) of a request.
> +
> +curl tweaked some internals in v8.4.0 and started giving 0 timeouts, and
> +a repeating callback is firing back-to-back without making any progress
> +in doing so.
> +
> +Revert the change and make the callback non-repeating again.
> +
> +Fixes: 05c31da4d9cb ('connectivity: don't cancel curl timerfunction from timeout')
> +Upstream: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/abc6e1cf258ab332bed161036a358bbe9c2d1e90
> +Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
> +---
> + src/core/nm-connectivity.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c
> +index 92de44f17d..d8b0004c38 100644
> +--- a/src/core/nm-connectivity.c
> ++++ b/src/core/nm-connectivity.c
> +@@ -406,9 +406,10 @@ _con_curl_timeout_cb(gpointer user_data)
> + {
> +     NMConnectivityCheckHandle *cb_data = user_data;
> + 
> ++    cb_data->concheck.curl_timer = 0;
> +     _con_curl_check_connectivity(cb_data->concheck.curl_mhandle, CURL_SOCKET_TIMEOUT, 0);
> +     _complete_queued(cb_data->self);
> +-    return G_SOURCE_CONTINUE;
> ++    return G_SOURCE_REMOVE;
> + }
> + 
> + static int
> +-- 
> +GitLab
> +
> -- 
> 2.42.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4
  2023-11-07 12:41 [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4 Christian Hitz via buildroot
  2023-11-07 20:24 ` Marcus Hoffmann via buildroot
  2023-11-07 21:56 ` Yann E. MORIN
@ 2023-11-10 20:10 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2023-11-10 20:10 UTC (permalink / raw)
  To: Christian Hitz via buildroot; +Cc: Christian Hitz, Christian Hitz

>>>>> "Christian" == Christian Hitz via buildroot <buildroot@buildroot.org> writes:

 > From: Christian Hitz <christian.hitz@bbv.ch>
 > This upstream patch restores the connectivity check functionality with
 > libcurl 8.4.

 > Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
 > ---
 > Backport to: 2023.02.x, 2023.08.x

Committed to 2023.02.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-10 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 12:41 [Buildroot] [PATCH 1/1] package/network-manager: add patch for compatibility with curl 8.4 Christian Hitz via buildroot
2023-11-07 20:24 ` Marcus Hoffmann via buildroot
2023-11-07 21:56 ` Yann E. MORIN
2023-11-10 20:10 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox