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] plugins: ethernet: get rid of truncate warning
(Marcus Folkesson)
2. [PATCH v2] plugins: ethernet: get rid of truncate warning
(Marcus Folkesson)
3. Making iwd WiFi backend support scanning (Doron Behar)
----------------------------------------------------------------------
Message: 1
Date: Mon, 27 Aug 2018 14:32:26 +0200
From: Marcus Folkesson <[email protected]>
To: [email protected]
Subject: [PATCH] plugins: ethernet: get rid of truncate warning
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
The buffer will never be truncated in reality, but it is the only
warning during compile... so get rid of it.
The ethtool_cmd.phy_address used as dsaport is an __u8, so a `char` is
sufficient.
Use `char` as dsaport to not make snprintf nervous about truncating
something.
Warning:
----------------------->8-----------------------------------
plugins/ethernet.c: In function ?ethernet_newlink?:
plugins/ethernet.c:208:52: warning: ?__builtin___snprintf_chk? output may be
truncated before the last format character [-Wformat-truncation=]
snprintf(group, sizeof(group), "p%02x_%03x_cable", dsaport, vid);
^
In file included from /usr/include/stdio.h:862,
from plugins/ethernet.c:31:
/usr/include/bits/stdio2.h:64:10: note: ?__builtin___snprintf_chk? output
between 14 and 17 bytes into a destination of size 16
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
----------------------->8-----------------------------------
Signed-off-by: Marcus Folkesson <[email protected]>
---
plugins/ethernet.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/plugins/ethernet.c b/plugins/ethernet.c
index 935c9671..2e8e064e 100644
--- a/plugins/ethernet.c
+++ b/plugins/ethernet.c
@@ -84,10 +84,10 @@ static int get_vlan_vid(const char *ifname)
return vid;
}
-static int get_dsa_port(const char *ifname)
+static char get_dsa_port(const char *ifname)
{
int sk;
- int dsaport = -1;
+ char dsaport = -1;
struct ifreq ifr;
struct ethtool_cmd cmd;
struct ethtool_drvinfo drvinfocmd;
@@ -193,7 +193,8 @@ static void add_network(struct connman_device *device,
if (!eth_tethering) {
char group[16] = "cable";
- int vid, dsaport;
+ short vid;
+ char dsaport;
vid = get_vlan_vid(ifname);
dsaport = get_dsa_port(ifname);
--
2.18.0
------------------------------
Message: 2
Date: Mon, 27 Aug 2018 14:49:13 +0200
From: Marcus Folkesson <[email protected]>
To: [email protected]
Subject: [PATCH v2] plugins: ethernet: get rid of truncate warning
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
The buffer will never be truncated in reality, but it is the only
warning during compile... so get rid of it.
Increase group buffer size to not make snprintf nervous about truncating
something.
Warning:
----------------------->8-----------------------------------
plugins/ethernet.c: In function ?ethernet_newlink?:
plugins/ethernet.c:208:52: warning: ?__builtin___snprintf_chk? output may be
truncated before the last format character [-Wformat-truncation=]
snprintf(group, sizeof(group), "p%02x_%03x_cable", dsaport, vid);
^
In file included from /usr/include/stdio.h:862,
from plugins/ethernet.c:31:
/usr/include/bits/stdio2.h:64:10: note: ?__builtin___snprintf_chk? output
between 14 and 17 bytes into a destination of size 16
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
----------------------->8-----------------------------------
Signed-off-by: Marcus Folkesson <[email protected]>
---
Notes:
v2:
increase buffer size instead of changing types of dsa_port. Feels more
clean.
plugins/ethernet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/ethernet.c b/plugins/ethernet.c
index 935c9671..4b265621 100644
--- a/plugins/ethernet.c
+++ b/plugins/ethernet.c
@@ -192,7 +192,7 @@ static void add_network(struct connman_device *device,
}
if (!eth_tethering) {
- char group[16] = "cable";
+ char group[25] = "cable";
int vid, dsaport;
vid = get_vlan_vid(ifname);
--
2.18.0
------------------------------
Message: 3
Date: Mon, 27 Aug 2018 21:28:50 +0300
From: Doron Behar <[email protected]>
To: [email protected]
Subject: Making iwd WiFi backend support scanning
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
After a [small chat with the iwd mailing list][1], I've found out that
`connman` can't scan WiFi networks when using `iwd` as a WiFi backend,
but with `wpa_supplicant` it can.
Are there any plans to add this functionality to `connman`? I would
really like to get rid of `wpa_supplicant` once and for all when this
feature will be available..
Thanks.
[1]: https://lists.01.org/pipermail/iwd/2018-August/004717.html
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 34, Issue 17
***************************************