X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tun.c;h=9ef3a9d627c161b96c50290b2985dcf7d307d176;hb=61dbc9e060153651a0d4eecac5a5fab1c36fa530;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;