sysctl: set ipv4 settings in a race-free way
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Jan 2020 09:41:31 +0000 (10:41 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 3 Feb 2020 23:01:50 +0000 (00:01 +0100)
commit5d4fc0e665a3639f92ac880896c56f9533441307
tree19d2d4524395848394fda275ca9add4b86d4a7b9
parente0f424790d3dbde136a29a7fa4c2777c2e3fd695
sysctl: set ipv4 settings in a race-free way

Fixes #6282.

This solution is a bit busy, but we close the race without setting *.all.*, so
it is still possible to set a different setting for particular interfaces.
Setting just "default" is not very useful because any interfaces present before
systemd-sysctl is invoked are not affected. Setting "all" is too harsh, because
the kernel takes the stronger of the device-specific setting and the "all" value,
so effectively having a weaker setting for specific interfaces is not possible.
sysctl.d/50-default.conf