summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/router.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/router.c b/src/router.c
index f1471db..34d43b0 100644
--- a/src/router.c
+++ b/src/router.c
@@ -232,6 +232,9 @@ static void router_netevent_cb(unsigned long event, struct netevent_handler_info
case NETEV_IFINDEX_CHANGE:
iface = info->iface;
if (iface && iface->router_event.uloop.fd >= 0) {
+ if (iface->router_event.uloop.registered)
+ uloop_fd_delete(&iface->router_event.uloop);
+
close(iface->router_event.uloop.fd);
iface->router_event.uloop.fd = -1;
}