netlink.so: Add support for IFF_RUNNING => net/IFNAME/running

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-12-31 12:07:47 +01:00
parent 3aa9d9f451
commit 04a4653e9b
+12
View File
@@ -130,6 +130,18 @@ static void nl_link(struct nlmsghdr *nlmsg)
else
cond_clear(msg);
if (string_compare("lo", ifname)) {
snprintf(msg, sizeof(msg), "net/%s/exist", ifname);
cond_set(msg);
}
} else if (i->ifi_change & IFF_RUNNING) {
snprintf(msg, sizeof(msg), "net/%s/running", ifname);
if (i->ifi_flags & IFF_RUNNING)
cond_set(msg);
else
cond_clear(msg);
if (string_compare("lo", ifname)) {
snprintf(msg, sizeof(msg), "net/%s/exist", ifname);
cond_set(msg);