discover/network: Search by UUID only if available
[petitboot] / discover / network.c
index 69223b149adacd0c133beb06de88d06300e324a4..c3cf30ac973b54f875d56356fc58910190240e0d 100644 (file)
@@ -242,7 +242,10 @@ void network_register_device(struct network *network,
 {
        struct interface *iface;
 
-       iface = find_interface_by_uuid(network, dev->uuid);
+       if (dev->uuid)
+               iface = find_interface_by_uuid(network, dev->uuid);
+       else
+               iface = find_interface_by_name(network, dev->label);
        if (!iface)
                return;