connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] Respect EnableOnlineCheck globally
@ 2021-08-28 17:16 Страхиња Радић
  2021-08-28 17:34 ` Страхиња Радић
  0 siblings, 1 reply; 5+ messages in thread
From: Страхиња Радић @ 2021-08-28 17:16 UTC (permalink / raw)
  To: connman

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

Currently, even while having EnableOnlineCheck=false,
EnableOnlineToReadyTransition=false and Enable6to4=false in the configuration
file, connman seems to make connections to ipv4.connman.net and ipv6.connman.net
in the function wispr_portal_detect in src/wispr.c. This patch makes the
configuration option behave consistently by setting the status_url to
"localhost" if EnableOnlineCheck=false. 

If a user doesn't want connman "pinging home", that should be respected.

---
 src/wispr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/wispr.c b/src/wispr.c
index c63dc819..d69ed70b 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -916,6 +916,11 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context)
 		wp_context->status_url = STATUS_URL_IPV6;
 	}
 
+	/* Respect EnableOnlineCheck globally */
+	if (connman_setting_get_bool("EnableOnlineCheck")) {
+		wp_context->status_url = "localhost";
+	}
+
 	for (i = 0; nameservers[i]; i++)
 		g_web_add_nameserver(wp_context->web, nameservers[i]);
 
-- 
2.33.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-08-29 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28 17:16 [PATCH] Respect EnableOnlineCheck globally Страхиња Радић
2021-08-28 17:34 ` Страхиња Радић
2021-08-29 17:54   ` Daniel Wagner
2021-08-29 19:32     ` Страхиња Радић
2021-08-29 19:37       ` Daniel Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).