X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tun.c;fp=tun.c;h=9ef3a9d627c161b96c50290b2985dcf7d307d176;hb=56fd04e41e9985260b8c1660e299cfe051d3f260;hp=ffc195ca5a4f3c777db13b5ebe77de94f2f5d5a9;hpb=4fb0f88d53fc60395a4a87b7a9ca1245ba033ee7;p=secnet.git 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;