mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
Close fd's of persistent tap devices
When passing a NULL tapfd argument to brAddTap, we need to close the fd of the tap device. If we don't, libvirt will keep the fd open indefinitely and renders the the guest unable to configure its side of the tap device. Signed-off-by: Soren Hansen <soren@linux2go.dk>
This commit is contained in:
parent
3ad8cbd3be
commit
4358f76aa4
@ -538,6 +538,8 @@ brAddTap(brControl *ctl,
|
||||
goto error;
|
||||
if (tapfd)
|
||||
*tapfd = fd;
|
||||
else
|
||||
close(fd);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
Loading…
Reference in New Issue
Block a user