X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Ftunalloc.c;h=b2484b9e4b01b0d3a9ba5069bc4068ca9d4a60ef;hb=2d04b6ea214daf96020ce5ca994fcb5380556247;hp=1f083e517817d6fc754cad5d00a37de70674fb87;hpb=91ae5bece01cfe69741f9e284d0ccf78fce87eb0;p=sliver-openvswitch.git diff --git a/lib/tunalloc.c b/lib/tunalloc.c index 1f083e517..b2484b9e4 100644 --- a/lib/tunalloc.c +++ b/lib/tunalloc.c @@ -6,10 +6,12 @@ * new tuntap interface. Interface name can be acquired via TUNGETIFF ioctl. */ +#include #include #include #include #include +#include #include #include #include @@ -97,5 +99,8 @@ int tun_alloc(int iftype, char *if_name) } remotefd = receive_vif_fd(control_fd, if_name); + + close(control_fd); + return remotefd; }