summaryrefslogtreecommitdiffhomepage
path: root/src/netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 0a2da03..9b9fdb8 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -313,8 +313,15 @@ static int handle_rtm_link(struct nlmsghdr *hdr)
iface->ifflags = ifi->ifi_flags;
- if (iface->ifindex == ifi->ifi_index)
+ /*
+ * Assume for link event of the same index, that link changed
+ * and reload services to enable or disable them based on the
+ * RUNNING state of the interface.
+ */
+ if (iface->ifindex == ifi->ifi_index) {
+ reload_services(iface);
continue;
+ }
iface->ifindex = ifi->ifi_index;
event_info.iface = iface;