main loop: Use <bsd/sys/queue.h> for poll interest list
[secnet] / tun.c
diff --git a/tun.c b/tun.c
index ffc195c..9ef3a9d 100644 (file)
--- a/tun.c
+++ b/tun.c
@@ -241,7 +241,7 @@ static bool_t tun_set_route(void *sst, struct netlink_client *routes)
            break;
        }
     }
-    if (st->route_type==TUN_CONFIG_IOCTL) {
+    if (fd >= 0) {
        close(fd);
     }
     routes->kup=up;