Add system info messages
[petitboot] / discover / network.c
index c853a97b0cf21d8350f702d3c83dac780a79c3b5..9aa975204e0f71de40070340e506d1f3ed6dd3e4 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "file.h"
 #include "network.h"
+#include "sysinfo.h"
 #include "device-handler.h"
 
 #define HWADDR_SIZE    6
@@ -406,6 +407,12 @@ static int network_handle_nlmsg(struct network *network, struct nlmsghdr *nlmsg)
                memcpy(interface->hwaddr, ifaddr, sizeof(interface->hwaddr));
                strncpy(interface->name, ifname, sizeof(interface->name) - 1);
                add_interface(network, interface);
+
+               /* tell the sysinfo code about this interface */
+               if (strcmp(interface->name, "lo"))
+                       system_info_register_interface(
+                                       sizeof(interface->hwaddr),
+                                       interface->hwaddr, interface->name);
        }
 
        configure_interface(network, interface,