From: Chengyi Zhao <[email protected]>

Update the network interface name if it is renamed by
systemd-udevd or udevd. When system starting,
the newlink ifname of ConnMan received from kernel is wlan0,
but systemd-udevd renamed network interface wlan0 to other name.
---
 src/rtnl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rtnl.c b/src/rtnl.c
index 0d68337..6d47822 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -451,7 +451,7 @@ static void process_newlink(unsigned short type, int index, 
unsigned flags,
        if (!interface) {
                interface = g_new0(struct interface_data, 1);
                interface->index = index;
-               interface->name = g_strdup(ifname);
+               interface->name = connman_inet_ifname(index);
                interface->ident = g_strdup(ident);
 
                g_hash_table_insert(interface_list,
-- 
1.7.9.5

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to