#include "file.h"
#include "network.h"
+#include "sysinfo.h"
#include "device-handler.h"
#define HWADDR_SIZE 6
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,
}
dns_conf_len = strlen(dns_conf);
- buf = talloc_realloc(network, buf, char, len + dns_conf_len);
+ buf = talloc_realloc(network, buf, char, len + dns_conf_len + 1);
memcpy(buf + len, dns_conf, dns_conf_len);
len += dns_conf_len;
+ buf[len - 1] = '\0';
modified = true;
talloc_free(dns_conf);