system_queries: Get Interface Info from netlink
This reduces all of the interface information probing down to a single
netlink request for all the label + mac information needed to build an
ethernet interface.
If we ever plumb the ethernet stats into dbus, we can get that
information with this same netlink code.
Change-Id: Ied8a73639dcd74bcfecda392905638573ab7970f
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/dhcp_configuration.cpp b/src/dhcp_configuration.cpp
index 33b2cbd..1822c35 100644
--- a/src/dhcp_configuration.cpp
+++ b/src/dhcp_configuration.cpp
@@ -27,11 +27,11 @@
{
config::Parser conf;
{
- auto interfaceStrList = system::getInterfaces();
- if (!interfaceStrList.empty())
+ auto interfaces = system::getInterfaces();
+ if (!interfaces.empty())
{
conf.setFile(config::pathForIntfConf(manager.getConfDir(),
- *interfaceStrList.begin()));
+ *interfaces[0].name));
}
}