diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2019-08-16 21:14:07 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2019-08-16 21:14:07 +0200 |
commit | 79eb1608191a1ce601f32b929826bae72f501a5e (patch) | |
tree | 97446d7eaedda336f43e01d5ee87bba66612f46f /src | |
parent | 6034b5c703cdb6f55d2847661fd1415184942ee2 (diff) |
router: fix previous commit
After closing the router socket the value needs to be set to -1
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/router.c | 4 |
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: |