system_queries: Log NIC up / down actions
This will help when debugging reconfiguration issues.
Change-Id: I3d5d9fe054b8afce47ea4fec4d4cb0ff3271f353
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/system_queries.cpp b/src/system_queries.cpp
index 17dd09a..00ba064 100644
--- a/src/system_queries.cpp
+++ b/src/system_queries.cpp
@@ -106,6 +106,8 @@
ifreq ifr = executeIFReq(ifname, SIOCGIFFLAGS);
ifr.ifr_flags &= ~IFF_UP;
ifr.ifr_flags |= up ? IFF_UP : 0;
+ lg2::info("Setting NIC {UPDOWN} on {NET_INTF}", "UPDOWN",
+ up ? "up"sv : "down"sv, "NET_INTF", ifname);
getIFSock().ioctl(SIOCSIFFLAGS, &ifr);
}