Imported Upstream version 1.35
[platform/upstream/connman.git] / src / rtnl.c
index d1b851f..a094e25 100644 (file)
@@ -173,7 +173,9 @@ static void read_uevent(struct interface_data *interface)
                } else if (strcmp(line + 8, "vlan") == 0) {
                        interface->service_type = CONNMAN_SERVICE_TYPE_ETHERNET;
                        interface->device_type = CONNMAN_DEVICE_TYPE_ETHERNET;
-
+               } else if (strcmp(line + 8, "bond") == 0) {
+                       interface->service_type = CONNMAN_SERVICE_TYPE_ETHERNET;
+                       interface->device_type = CONNMAN_DEVICE_TYPE_ETHERNET;
                } else {
                        interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN;
                        interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN;
@@ -469,7 +471,9 @@ static void process_newlink(unsigned short type, int index, unsigned flags,
 
                if (type == ARPHRD_ETHER)
                        read_uevent(interface);
-       } else
+       } else if (type == ARPHRD_ETHER && interface->device_type == CONNMAN_DEVICE_TYPE_UNKNOWN)
+               read_uevent(interface);
+       else
                interface = NULL;
 
        for (list = rtnl_list; list; list = list->next) {
@@ -1372,8 +1376,6 @@ static int process_response(guint32 seq)
 
 static void rtnl_message(void *buf, size_t len)
 {
-       DBG("buf %p len %zd", buf, len);
-
        while (len > 0) {
                struct nlmsghdr *hdr = buf;
                struct nlmsgerr *err;