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. Re: Iptables error with rule creation (Jeff Gray)
2. Cellular connection doesn't go online even if
ipv4.connman.net is reachable ? (snorky snorky)
3. [PATCH 2/4] network: Set ipconfig state to disconnected when
clearing (Patrik Flykt)
4. [PATCH 1/4] service: Network configuration method needs to be
cleared (Patrik Flykt)
5. [PATCH 3/4] ipconfig: Forward RTNL deladdr in all cases
(Patrik Flykt)
6. [PATCH 4/4] network: Disconnect IPv6 if no Router
Solicitation received (Patrik Flykt)
7. [PATCH 0/4] RTNL dellink handling (Patrik Flykt)
----------------------------------------------------------------------
Message: 1
Date: Fri, 2 Jun 2017 10:49:08 +1000
From: Jeff Gray <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: Iptables error with rule creation
Message-ID:
<cahb0ztm84pexx8ww_3qr_4musjlorf8z2hkh_r1dmmo4yir...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
On 1 June 2017 at 20:48, Daniel Wagner <[email protected]> wrote:
> Your email got marked as spam. Too much HTML I guess.
I've set this reply to plain text mode to avoid that in future.
> If you don't want to ifdef around I suggest to implement this API here:
[clip]
> The iptables and nftable code do this. Just add a new file and hook it
> up in the build process (Makefile.am). I think such a patch can be
> easily maintained out of tree. Or if it is nicely done, I don't see a
> real problem to accept it upstream.
>
> The function names indicate what the implementation is supposed to do.
> If you are just interested to get tethering working you need to
> implement the NAT function, e.g. from firewall-iptables:
[clip]
I understand what you are suggesting. I have been reading through
firewall-iptables.c & iptables.c trying to follow how the code works.
So I have a good idea where to go from here.
I will try to implement as nicely as possible so others can use it. I
won't do the full implementation including updating the configure
script, but I'll try to get the core code to a useful state.
Thanks for you help
Jeff
------------------------------
Message: 2
Date: Fri, 2 Jun 2017 12:04:27 +0200
From: snorky snorky <[email protected]>
To: [email protected]
Subject: Cellular connection doesn't go online even if
ipv4.connman.net is reachable ?
Message-ID:
<CAOzg-aP4Z-Qyg69_wmfxMMYcsOKQkxQ1MR2gjDZE=c15ecv...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Hello,
I have experienced a strange behavior with cellular connections.
I'm using two SIM from the same provider. One goes in Online state,
but not the other.
I have spied the DNS request and no response is received with the
failing SIM, but a manual nslookup on ipv4.connman.net through the
proper DNS (when the connection is up) successfully returns the proper
IP and a curl on http://ipv4.connman.net/online/status.html succeed.
I'm using 1.30.
Did someone experience similar behavior? Can it be related to the ISP
and a delay to wait before doing DNS request?
Regards
------------------------------
Message: 3
Date: Fri, 2 Jun 2017 15:07:30 +0300
From: Patrik Flykt <[email protected]>
To: [email protected]
Subject: [PATCH 2/4] network: Set ipconfig state to disconnected when
clearing
Message-ID: <[email protected]>
When clearing an IP configuration, the resulting state should be
disconnected.
---
src/network.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/network.c b/src/network.c
index 5b7ef556..bdaddc3d 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1541,14 +1541,9 @@ int __connman_network_clear_ipconfig(struct
connman_network *network,
break;
}
- if (type == CONNMAN_IPCONFIG_TYPE_IPV6)
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_CONFIGURATION,
- CONNMAN_IPCONFIG_TYPE_IPV6);
- else if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_CONFIGURATION,
- CONNMAN_IPCONFIG_TYPE_IPV4);
+ __connman_service_ipconfig_indicate_state(service,
+ CONNMAN_SERVICE_STATE_DISCONNECT,
+ type);
return 0;
}
--
2.11.0
------------------------------
Message: 4
Date: Fri, 2 Jun 2017 15:07:29 +0300
From: Patrik Flykt <[email protected]>
To: [email protected]
Subject: [PATCH 1/4] service: Network configuration method needs to be
cleared
Message-ID: <[email protected]>
When an RTNL deladdr message is received, the network configuration
needs to be cleared so that the configuration method is stopped and
the ipconfig set to disconnected. If the state is set, DHCP will be
left running which is not the intention.
---
src/service.c | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/service.c b/src/service.c
index d9c1907c..87db6d08 100644
--- a/src/service.c
+++ b/src/service.c
@@ -6591,31 +6591,30 @@ static void service_ip_bound(struct connman_ipconfig
*ipconfig,
static void service_ip_release(struct connman_ipconfig *ipconfig,
const char *ifname)
{
- struct connman_service *service = __connman_ipconfig_get_data(ipconfig);
+ struct connman_service *service;
enum connman_ipconfig_method method = CONNMAN_IPCONFIG_METHOD_UNKNOWN;
enum connman_ipconfig_type type = CONNMAN_IPCONFIG_TYPE_UNKNOWN;
DBG("%s ip release", ifname);
+ service = __connman_ipconfig_get_data(ipconfig);
+ if (!service) {
+ connman_warn("No service for ipconfig release");
+ return;
+ }
+
+ if (!service->network) {
+ connman_warn("No network for ipconfig release");
+ return;
+ }
+
type = __connman_ipconfig_get_config_type(ipconfig);
method = __connman_ipconfig_get_method(ipconfig);
DBG("service %p ipconfig %p type %d method %d", service, ipconfig,
type, method);
- if (type == CONNMAN_IPCONFIG_TYPE_IPV6 &&
- method == CONNMAN_IPCONFIG_METHOD_OFF)
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_DISCONNECT,
- CONNMAN_IPCONFIG_TYPE_IPV6);
-
- if (type == CONNMAN_IPCONFIG_TYPE_IPV4 &&
- method == CONNMAN_IPCONFIG_METHOD_OFF)
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_DISCONNECT,
- CONNMAN_IPCONFIG_TYPE_IPV4);
-
- settings_changed(service, ipconfig);
+ __connman_network_clear_ipconfig(service->network, ipconfig);
}
static void service_route_changed(struct connman_ipconfig *ipconfig,
--
2.11.0
------------------------------
Message: 5
Date: Fri, 2 Jun 2017 15:07:31 +0300
From: Patrik Flykt <[email protected]>
To: [email protected]
Subject: [PATCH 3/4] ipconfig: Forward RTNL deladdr in all cases
Message-ID: <[email protected]>
wpa_supplicant may have caused the link to be deconfigured, causing
the kernel to send RTNL dellinks for all addresses. If the link state
is checked, all RTNL dellinks will be missed and state is erroneously
indicated as ready or online.
There is also no need to count the number of addresses, it's enough
to know that there is at least one.
---
src/ipconfig.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/ipconfig.c b/src/ipconfig.c
index bae988ce..5f99d903 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -730,10 +730,7 @@ void __connman_ipconfig_deladdr(int index, int family,
const char *label,
connman_info("%s {del} address %s/%u label %s", ifname,
address, prefixlen, label);
- if ((ipdevice->flags & (IFF_RUNNING | IFF_LOWER_UP)) != (IFF_RUNNING |
IFF_LOWER_UP))
- goto out;
-
- if (g_slist_length(ipdevice->address_list) > 0)
+ if (ipdevice->address_list)
goto out;
for (list = g_list_first(ipconfig_list); list;
--
2.11.0
------------------------------
Message: 6
Date: Fri, 2 Jun 2017 15:07:32 +0300
From: Patrik Flykt <[email protected]>
To: [email protected]
Subject: [PATCH 4/4] network: Disconnect IPv6 if no Router
Solicitation received
Message-ID: <[email protected]>
When no Router Solicitations are received, clear the IPv6 ipconfig.
If not cleared, the IPv6 part will be forever stay in configuration
state.
---
src/network.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/network.c b/src/network.c
index bdaddc3d..b43fb914 100644
--- a/src/network.c
+++ b/src/network.c
@@ -417,7 +417,11 @@ static void check_dhcpv6(struct nd_router_advert *reply,
DBG("reply %p", reply);
+ service = connman_service_lookup_from_network(network);
+
if (!reply) {
+ struct connman_ipconfig *ipconfig;
+
/*
* Router solicitation message seem to get lost easily so
* try to send it again.
@@ -430,7 +434,14 @@ static void check_dhcpv6(struct nd_router_advert *reply,
check_dhcpv6, network);
return;
}
- connman_network_unref(network);
+
+ connman_network_set_associating(network, false);
+ network->connecting = false;
+
+ ipconfig = __connman_service_get_ip6config(service);
+
+ __connman_network_clear_ipconfig(network, ipconfig);
+
return;
}
@@ -455,7 +466,6 @@ static void check_dhcpv6(struct nd_router_advert *reply,
* another in the same interface. The only way to get IPv6
* config back is to re-create it here.
*/
- service = connman_service_lookup_from_network(network);
if (service) {
connman_service_create_ip6config(service, network->index);
--
2.11.0
------------------------------
Message: 7
Date: Fri, 2 Jun 2017 15:07:28 +0300
From: Patrik Flykt <[email protected]>
To: [email protected]
Subject: [PATCH 0/4] RTNL dellink handling
Message-ID: <[email protected]>
Hi,
wpa_supplicant sometimes deconfigures its link, with the kernel deleting
all addresses associated with the network. Unfortunately RTNL dellinks
are not handled very well in this case, causing ConnMan to miss all of
them and believing that the service is still in state ready or online.
In addition, IPv6 will stay in configuration state if no Router
Advertisements are received. Fix this by properly disconnecting IPV6
when enough Router Solicitations have been received.
Both of these in combination with someone removing IP addresses with
'ip addr del' will disconnect the service after all addresses have been
deleted.
Please test,
Patrik
Patrik Flykt (4):
service: Network configuration method needs to be cleared
network: Set ipconfig state to disconnected when clearing
ipconfig: Forward RTNL deladdr in all cases
network: Disconnect IPv6 if no Router Solicitation received
src/ipconfig.c | 5 +----
src/network.c | 25 +++++++++++++++----------
src/service.c | 27 +++++++++++++--------------
3 files changed, 29 insertions(+), 28 deletions(-)
--
2.11.0
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 20, Issue 2
**************************************