summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2019-03-21 14:38:36 -0700
committerRatan Gupta <ratagupt@linux.vnet.ibm.com>2019-04-11 11:00:56 +0000
commitf273d2b5629d2a7d96802dc7a7ddb92e303ac8de (patch)
tree4f7cfbf806befd9b2bdbc7cb129d81f2185b1de2
parentf4b4ff813029e2571447e9c21f51701f88595c3c (diff)
downloadphosphor-networkd-master.tar.gz
phosphor-networkd-master.zip
util: Don't ignore non-running interfacesHEADmaster
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>
-rw-r--r--util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.cpp b/util.cpp
index d1bcc71..6bc1497 100644
--- a/util.cpp
+++ b/util.cpp
@@ -389,8 +389,8 @@ InterfaceList getInterfaces()
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;
}
OpenPOWER on IntegriCloud