From 744bb9dd145d2962ea3af18a301c12165f251ca6 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 21 Jul 2016 14:04:37 +0200 Subject: [PATCH] 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 --- plugins/netlink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/netlink.c b/plugins/netlink.c index 0345e246..ef7e7cb6 100644 --- a/plugins/netlink.c +++ b/plugins/netlink.c @@ -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);