]> git.ipfire.org Git - thirdparty/systemd.git/commit
nsresourced: explicitly remove network interfaces when their userns goes away
authorLennart Poettering <lennart@poettering.net>
Mon, 10 Mar 2025 11:39:35 +0000 (12:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 17 Mar 2025 15:03:18 +0000 (16:03 +0100)
commit7d2e2900f18ccfc7284e1a4026046f95c528256d
treeb4994ab9d62d3a2fb0ae82c985e1994e785696d3
parente29d5385b6934b2d4dd6be08627459f59c1325e4
nsresourced: explicitly remove network interfaces when their userns goes away

Let's tighten the screws a bit on the network interfaces we delegate,
and explicitly destroy them, just like we destroy delegated cgroups.

Ideally, this should happen automatically because the userns goes away
that pins the veth, or because the client holding an fd for a tap device
goes away as the userns goes away. But you never know who keeps a
reference, hence let's explicitly destroy this too.
src/nsresourced/nsresourced-manager.c
src/nsresourced/nsresourcework.c
src/nsresourced/userns-registry.c
src/nsresourced/userns-registry.h