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. connman installs duplicate routes? (David Weidenkopf)
2. [PATCH] wispr: Prevent a crash when freeing wispr routes (Yasser)
----------------------------------------------------------------------
Message: 1
Date: Thu, 23 May 2019 23:23:19 +0000
From: David Weidenkopf <[email protected]>
To: "[email protected]" <[email protected]>
Subject: connman installs duplicate routes?
Message-ID:
<06C3949C7271B8419F288F951ED39EC2075F35@AME-MBX-PRD02.arthrex.local>
Content-Type: text/plain; charset="iso-8859-1"
Hi, I am using connman 1.35. If I enable both a ethernet and wifi service, the
default route is selected as you would expect. However, multiple routes will be
created for the LAN.
~# ip route show
default via 192.168.16.1 dev eth0
1.0.0.1 via 192.168.16.1 dev eth0
1.0.0.1 via 192.168.16.1 dev wifi0
1.1.1.1 via 192.168.16.1 dev eth0
1.1.1.1 via 192.168.16.1 dev wifi0
192.168.16.0/24 dev wifi0 proto kernel scope link src 192.168.16.40
192.168.16.0/24 dev eth0 proto kernel scope link src 192.168.16.29
192.168.16.1 dev eth0 scope link
192.168.16.1 dev wifi0 scope link
This output is after ethernet has been disconnected and been reconnected. The
default route is eth0 as expected. However, there are two LAN routes with the
wifi0 route being first and being selected. It seems that connman should either
remove the wifi0 route or set a metric on it.
The impact is that LAN traffic is sent over wifi0 instead of eth0. Using
SingleConnectedTechnology=true
in the configuration works around this but seems to be a discouraged setting.
Also, it means that wifi is not connected when ethernet is.
What is the best way to configure/use connman when ethernet and wifi are
present?
Is this a defect?
Regards
David
This e-mail and any files transmitted with it are the property of Arthrex, Inc.
and/or its affiliates, are confidential, and are intended solely for the use of
the individual or entity to whom this e-mail is addressed. If you are not one
of the named recipient(s) or otherwise have reason to believe that you have
received this message in error, please notify the sender at 239-643-5553 and
delete this message immediately from your computer. Any other use, retention,
dissemination forwarding, printing or copying of this e-mail is strictly
prohibited. Please note that any views or opinions presented in this email are
solely those of the author and do not necessarily represent those of the
company. Finally, while Arthrex uses virus protection, the recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.01.org/pipermail/connman/attachments/20190523/df4c6ea4/attachment-0001.html>
------------------------------
Message: 2
Date: Fri, 24 May 2019 12:11:51 +0200
From: Yasser <[email protected]>
To: [email protected]
Subject: [PATCH] wispr: Prevent a crash when freeing wispr routes
Message-ID:
<cakiau+0vdqsngfo0kfynf+pc5_rr+65dmkyk_mtf3ey51d+...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I have had the connman crash when free_wispr_routes() is called. It happens
when there are lots of wireless networks around but none with good signal
strength.
As a fix, I use g_slist_nth_data() to get the wispr_route and check it
before using it.
diff --git a/src/wispr.c b/src/wispr.c
index 0ab041e..546660a 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -128,28 +128,30 @@ static void connman_wispr_message_init(struct
connman_wispr_message *msg)
static void free_wispr_routes(struct connman_wispr_portal_context
*wp_context)
{
while (wp_context->route_list) {
- struct wispr_route *route = wp_context->route_list->data;
-
- DBG("free route to %s if %d type %d", route->address,
- route->if_index, wp_context->type);
+ struct wispr_route *route =
g_slist_nth_data(wp_context->route_list, 0);
+
+ if (route) {
+ DBG("free route to %s if %d type %d", route->address,
+ route->if_index, wp_context->type);
+
+ switch (wp_context->type) {
+ case CONNMAN_IPCONFIG_TYPE_IPV4:
+ connman_inet_del_host_route(route->if_index,
+ route->address);
+ break;
+ case CONNMAN_IPCONFIG_TYPE_IPV6:
+ connman_inet_del_ipv6_host_route(route->if_index,
+ route->address);
+ break;
+ case CONNMAN_IPCONFIG_TYPE_UNKNOWN:
+ case CONNMAN_IPCONFIG_TYPE_ALL:
+ break;
+ }
- switch (wp_context->type) {
- case CONNMAN_IPCONFIG_TYPE_IPV4:
- connman_inet_del_host_route(route->if_index,
- route->address);
- break;
- case CONNMAN_IPCONFIG_TYPE_IPV6:
- connman_inet_del_ipv6_host_route(route->if_index,
- route->address);
- break;
- case CONNMAN_IPCONFIG_TYPE_UNKNOWN:
- case CONNMAN_IPCONFIG_TYPE_ALL:
- break;
+ g_free(route->address);
+ g_free(route);
}
- g_free(route->address);
- g_free(route);
-
wp_context->route_list =
g_slist_delete_link(wp_context->route_list,
wp_context->route_list);
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.01.org/pipermail/connman/attachments/20190524/f19139d5/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 43, Issue 19
***************************************