Use IFF_LOWER_UP instead of IFF_RUNNING for link detection
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Dec 2008 08:20:04 +0000 (09:20 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Dec 2008 08:20:04 +0000 (09:20 +0100)
plugins/ethernet.c

index 28c1742..832d636 100644 (file)
@@ -62,12 +62,12 @@ static void ethernet_newlink(unsigned short type, int index,
                if (ethernet->index != index)
                        continue;
 
-               if ((ethernet->flags & IFF_RUNNING) == (flags & IFF_RUNNING))
+               if ((ethernet->flags & IFF_LOWER_UP) == (flags & IFF_LOWER_UP))
                        continue;
 
                ethernet->flags = flags;
 
-               if (ethernet->flags & IFF_RUNNING) {
+               if (ethernet->flags & IFF_LOWER_UP) {
                        DBG("carrier on");
 
                        netdev = connman_element_create(NULL);