chiark / gitweb /
networkd-wait-online: improve interoptability and enable by default
[elogind.git] / src / network / networkd-link.c
index 310b9f54f96c7cd6aa42f5a1d0613692632dd38c..015a82d0d6022e4f83270afdc8eb3c9b9e1cc0d0 100644 (file)
@@ -30,6 +30,7 @@
 #include "bus-util.h"
 #include "network-internal.h"
 
+#include "network-util.h"
 #include "dhcp-lease-internal.h"
 
 static int ipv4ll_address_update(Link *link, bool deprecate);
@@ -1098,20 +1099,6 @@ static int link_acquire_conf(Link *link) {
         return 0;
 }
 
-static bool link_has_carrier(unsigned flags, uint8_t operstate) {
-        /* see Documentation/networking/operstates.txt in the kernel sources */
-
-        if (operstate == IF_OPER_UP)
-                return true;
-
-        if (operstate == IF_OPER_UNKNOWN)
-                /* operstate may not be implemented, so fall back to flags */
-                if ((flags & IFF_LOWER_UP) && !(flags & IFF_DORMANT))
-                        return true;
-
-        return false;
-}
-
 static int link_update_flags(Link *link, sd_rtnl_message *m) {
         unsigned flags, flags_added, flags_removed, generic_flags;
         uint8_t operstate;