connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Страхиња Радић" <contact@strahinja.org>
To: connman <connman@lists.linux.dev>
Subject: [PATCH] Respect EnableOnlineCheck globally
Date: Sat, 28 Aug 2021 19:16:57 +0200	[thread overview]
Message-ID: <20210828171657.2qxolbym36hdiuhu@prancingpony> (raw)

[-- 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 --]

             reply	other threads:[~2021-08-28 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28 17:16 Страхиња Радић [this message]
2021-08-28 17:34 ` [PATCH] Respect EnableOnlineCheck globally Страхиња Радић
2021-08-29 17:54   ` Daniel Wagner
2021-08-29 19:32     ` Страхиња Радић
2021-08-29 19:37       ` Daniel Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210828171657.2qxolbym36hdiuhu@prancingpony \
    --to=contact@strahinja.org \
    --cc=connman@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).