HomeClusterLabs Projects

nozzle: don´t leak tun/tap interfaces in test suite

Description

nozzle: don´t leak tun/tap interfaces in test suite

the need_tun() test check to verify that the kernel module for tun/tap
is loaded, was opening a generic /dev/tun (or /dev/tap) to verify
the presence of the kernel module.

On linux, closing the fd to the tap/tun device is enough to destroy
the device.

On BSD the device is set to DOWN on closing the fd, but it´s not
destroyed.

Stop leaking by gathering ifr ioctl info from the generic interface
created by BSD and pass it to the ioctlfd to destroy.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

Details

Provenance
fabbioneAuthored on Sep 18 2023, 5:42 AM
Parents
rKdec74d2d5cea: Merge pull request #414 from kronosnet/rust_1_72
Branches
Unknown
Tags
Unknown