From c2d6032212f76bef99f04ad3216e76cf8bc47b71 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Fri, 16 Aug 2019 21:14:07 +0200 Subject: [PATCH] router: fix previous commit After closing the router socket the value needs to be set to -1 Signed-off-by: Hans Dedecker --- src/router.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/router.c b/src/router.c index 5d09a3a..4bc9a96 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: -- 2.30.2