Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH 0/1] Start online check on IP address update
(Robert Tiemann)
2. [PATCH 1/1] service: Start online check on IP address update
(Robert Tiemann)
----------------------------------------------------------------------
Message: 1
Date: Tue, 26 Mar 2019 11:14:52 +0100
From: Robert Tiemann <[email protected]>
To: [email protected]
Subject: [PATCH 0/1] Start online check on IP address update
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hi,
I've discovered that ConnMan does not enter online state when going
from IPV4LL to DHCP-assigned address. ConnMan remains in ready state
because the online check is not triggered again in this case.
Here is a scenario for reproducing the problem:
- A device running ConnMan is attached to an Ethernet switch.
- The Ethernet switch is powered on, but is connected only to the
device, not to any network.
- The wired service is set up for DHCP.
- ConnMan tries to configure the Ethernet connection via DHCP, fails
because there is no DHCP server on the network, and resorts to
IPV4LL.
- ConnMan starts sending periodic DHCP requests to get a proper IP
address.
- After connecting the switch to a network which has a DHCP server,
ConnMan's DHCP requests are answered. IP configuration succeeds, but
ConnMan remains in ready state.
I have checked the debug output. After the configuration via IPV4LL
has succeeded, __connman_service_wispr_start() is called, and
wispr_portal_detect() fails with the message "Could not get
nameservers". Then, ConnMan ends up in ready state. Fair enough.
When the DHCP requests are answered, the Ethernet interface is
configured correctly, but __connman_service_wispr_start() is not
called again. Thus, ConnMan remains in its previously assumed ready
state.
To fix this, I have prepared a patch against master which triggers the
online check when the IP address is updated. It works, but I am not
sure if this is a good solution or if the patch is just fighting a
symptom caused by a problem which should be fixed somewhere else.
Cheers,
Robert
Robert Tiemann (1):
service: Start online check on IP address update
src/service.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
--
2.17.1
------------------------------
Message: 2
Date: Tue, 26 Mar 2019 11:16:54 +0100
From: Robert Tiemann <[email protected]>
To: [email protected]
Subject: [PATCH 1/1] service: Start online check on IP address update
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
This patch enables ConnMan to enter online state after getting IP
configuration via DHCP when coming from an IPV4LL configuration.
---
src/service.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/service.c b/src/service.c
index 3202f26c..8d672b03 100644
--- a/src/service.c
+++ b/src/service.c
@@ -144,6 +144,8 @@ static struct connman_ipconfig *create_ip4config(struct
connman_service *service
static struct connman_ipconfig *create_ip6config(struct connman_service
*service,
int index);
static void dns_changed(struct connman_service *service);
+static void start_online_check(struct connman_service *service,
+ enum connman_ipconfig_type type);
struct find_data {
const char *path;
@@ -1395,6 +1397,7 @@ static void address_updated(struct connman_service
*service,
service == connman_service_get_default()) {
nameserver_remove_all(service, type);
nameserver_add_all(service, type);
+ start_online_check(service, type);
__connman_timeserver_sync(service);
}
@@ -5955,6 +5958,20 @@ done:
__connman_service_wispr_start(service, CONNMAN_IPCONFIG_TYPE_IPV4);
}
+static void start_online_check(struct connman_service *service,
+ enum connman_ipconfig_type type)
+{
+ if (connman_setting_get_bool("EnableOnlineCheck"))
+ if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
+ check_proxy_setup(service);
+ } else {
+ __connman_service_wispr_start(service, type);
+ }
+ else
+ connman_info("Online check disabled. "
+ "Default service remains in READY state.");
+}
+
/*
* How many networks are connected at the same time. If more than 1,
* then set the rp_filter setting properly (loose mode routing) so that network
@@ -6147,15 +6164,7 @@ int __connman_service_ipconfig_indicate_state(struct
connman_service *service,
case CONNMAN_SERVICE_STATE_CONFIGURATION:
break;
case CONNMAN_SERVICE_STATE_READY:
- if (connman_setting_get_bool("EnableOnlineCheck"))
- if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
- check_proxy_setup(service);
- } else {
- __connman_service_wispr_start(service, type);
- }
- else
- connman_info("Online check disabled. "
- "Default service remains in READY state.");
+ start_online_check(service, type);
if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
service_rp_filter(service, true);
set_mdns(service, service->mdns_config);
--
2.17.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 41, Issue 26
***************************************