[Bug 277435] [Feature request] Add an option to destroy the tap/tun interface when the descriptor is closed

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 03 Mar 2024 14:22:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277435

--- Comment #2 from Nikolay Borodin <monsterovich@gmail.com> ---
(In reply to Alan Somers from comment #1)
> On the last close of the data device, the interface is brought down (as if with “ifconfig tapN down”)

It's completely different. What I am suggesting refers to the automatic
"ifconfig tapN destroy" when closing the descriptor.

If you use tap/tun via open("/dev/tap") without a number you will get a new
device each time (tap0, tap1, tap2, etc.) which cannot be destroyed during the
lifetime of the application.

Doing this manually is inconvenient for the user, so we need to make the
application delete the interface when it closes the descriptor.

Fortunately, the Linux driver equivalent does this by default.

-- 
You are receiving this mail because:
You are the assignee for the bug.