X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/4fb0f88d53fc60395a4a87b7a9ca1245ba033ee7..3f2c70f6b6d5ba48ff9fbe7887eb2e77ea128220:/tun.c diff --git a/tun.c b/tun.c index ffc195c..9ef3a9d 100644 --- 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;