summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/router.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/router.c b/src/router.c
index 85940f8..f1471db 100644
--- a/src/router.c
+++ b/src/router.c
@@ -231,8 +231,10 @@ static void router_netevent_cb(unsigned long event, struct netevent_handler_info
switch (event) {
case NETEV_IFINDEX_CHANGE:
iface = info->iface;
- if (iface && iface->router_event.uloop.fd >= 0)
+ if (iface && iface->router_event.uloop.fd >= 0) {
close(iface->router_event.uloop.fd);
+ iface->router_event.uloop.fd = -1;
+ }
break;
case NETEV_ROUTE6_ADD:
case NETEV_ROUTE6_DEL: