X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tun.c;h=9ef3a9d627c161b96c50290b2985dcf7d307d176;hb=refs%2Ftags%2Fproposed.ipv6-3.v2;hp=ffc195ca5a4f3c777db13b5ebe77de94f2f5d5a9;hpb=ccf25024a3b46e9ca2b1842883b2f0953daf4842;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;