Branch: refs/heads/stable1-proposed
Home:
https://github.com/kronosnet/kronosnet
Commit: cae7cafa5f0301df53eb8510638531b5d2932b5f
https://github.com/kronosnet/kronosnet/commit/cae7cafa5f0301df53eb851063853…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2023-09-18 (Mon, 18 Sep 2023)
Changed paths:
M libnozzle/tests/test-common.c
Log Message:
-----------
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(a)redhat.com>