If you are using a bond interface, the bond interface and the slave
interfaces will share the same MAC address.  This can eventually
cause connman to crash, because several things depend on a unique
MAC address per interface.

We can just skip slave interfaces altogether, since connman can't
do anything with them anyway.
---
 src/rtnl.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/rtnl.c b/src/rtnl.c
index be1bce9..19cbe20 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -431,6 +431,13 @@ static void process_newlink(unsigned short type, int 
index, unsigned flags,
                                                address.ether_addr_octet[4],
                                                address.ether_addr_octet[5]);
 
+       if ((flags & IFF_SLAVE) ||
+           memcmp(&address, &compare, ETH_ALEN) == 0) {
+               connman_info("%s {newlink} skipping index %d address %s flags 
%x",
+                                               ifname, index, str, flags);
+               return;
+       }
+
        switch (type) {
        case ARPHRD_ETHER:
        case ARPHRD_LOOPBACK:
@@ -442,9 +449,8 @@ static void process_newlink(unsigned short type, int index, 
unsigned flags,
                break;
        }
 
-       if (memcmp(&address, &compare, ETH_ALEN) != 0)
-               connman_info("%s {newlink} index %d address %s mtu %u",
-                                               ifname, index, str, mtu);
+       connman_info("%s {newlink} index %d address %s mtu %u",
+                                       ifname, index, str, mtu);
 
        if (operstate != 0xff)
                connman_info("%s {newlink} index %d operstate %u <%s>",
-- 
1.7.9.5

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to