chiark / gitweb /
resolver: Provide input name as argument to callback
[secnet.git] / tun.c
diff --git a/tun.c b/tun.c
index ffc195ca5a4f3c777db13b5ebe77de94f2f5d5a9..9ef3a9d627c161b96c50290b2985dcf7d307d176 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;