mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -538,6 +538,8 @@ brAddTap(brControl *ctl,
|
||||
goto error;
|
||||
if (tapfd)
|
||||
*tapfd = fd;
|
||||
else
|
||||
close(fd);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user