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
rK49ef95aea3bb: [crypto] Try crypt and decrypt on crypto_init
Branches
Unknown
Tags
Unknown