]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: Open netfilter socket only when needed
authorValentin David <valentin.david@canonical.com>
Mon, 4 May 2026 08:25:19 +0000 (10:25 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 4 May 2026 14:25:03 +0000 (15:25 +0100)
commit4a11c5edeb37de4fd73dc2ff059e7a6112514583
tree510042c0c1abcdd6d84e34bfc190e805a6d3d3fd
parent7e6507c43fd16ced45b0080aa8c1883ad62fe054
core: Open netfilter socket only when needed

On initrds where nfnetlink module is missing, trying to open
a NETLINK_NETFILTER netlink socket takes a lot of time then fails.
This makes boot noticibly slower. Even though probably no
unit in an initrd need netfilter.

So here we delay opening the socket until we know we need it.
src/core/cgroup.c
src/core/unit.c