util: Don't ignore non-running interfaces
We want to be able to configure interfaces which are not running. Just
because we don't have a cable plugged into the machine doesn't mean we
don't want to have the option to configure it from the host
Tested:
Built an image and made sure the interface was now present and
configurable even if it had no link present.
Change-Id: Ib93ddddc8ca015fe024209fa9cbeb5fc24421728
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/util.cpp b/util.cpp
index d1bcc71..6bc1497 100644
--- a/util.cpp
+++ b/util.cpp
@@ -389,8 +389,8 @@
for (ifaddrs* ifa = ifaddrPtr.get(); ifa != nullptr; ifa = ifa->ifa_next)
{
// walk interfaces
- // if loopback, or not running ignore
- if ((ifa->ifa_flags & IFF_LOOPBACK) || !(ifa->ifa_flags & IFF_RUNNING))
+ // if loopback ignore
+ if (ifa->ifa_flags & IFF_LOOPBACK)
{
continue;
}