default globbed sysctls override linux defaults
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
In 22.04, systemd ships the following globbed sysctls:
$ grep -r -F '*' /usr/lib/sysctl.d /etc/sysctl.*
/usr/
/usr/
/usr/
This seems to break linux's built-in .defaults sysctls. For instance, `net.ipv4.
According to sysctl.d(5), they're applied /individually/ when interfaces show up:
> The settings configured with sysctl.d files will be applied early on boot.
> The network interface-specific options will also be applied individually for
> each network interface as it shows up in the system. (More specifically,
> net.ipv4.conf.*, net.ipv6.conf.*, net.ipv4.neigh.* and net.ipv6.neigh.*).
That means something (networkd?) applies `net.ipv4.
It isn't clear from sysctl.d(5) how to disable this. With some experimentation, I've come up with:
-net.
net.
net.
But I'm not sure that first line is valid. sysctl.d(5) doesn't document this case.
Perhaps the systemd package should not ship globbed sysctls in the above-documented network subtrees - are there use cases not covered by the .defaults sysctls?
I haven't checked if later packages continue to ship the above config.

These are just defaults. You can override anything you like by specifying your own values in e.g. /etc/sysctl. d/60-my- overrides. conf. See "Configuration Directories and Precedence" in https:/ /www.freedeskto p.org/software/ systemd/ man/latest/ sysctl. d.html for more details.