Workaround for loopback interface

We never get any NEWLINK message for lo since it as an interface exists
very early.  So we add this workaround when lo comes up so services can
depend on exists for lo as well as for other interfaces.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-07-21 14:04:37 +02:00
parent 1edfecdaab
commit 744bb9dd14
+4
View File
@@ -129,6 +129,10 @@ 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 {
snprintf(msg, sizeof(msg), "net/%s/exist", ifname);
cond_set(msg);