]> git.ipfire.org Git - thirdparty/systemd.git/commit
network,udev: refuse .link and .network settings with no matches 14761/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Feb 2020 07:42:50 +0000 (08:42 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Feb 2020 07:45:52 +0000 (08:45 +0100)
commitdade7349174765a702ab5cb9e27608ca966c3673
treec9ead552c763bbd6df872e86a30ffd803ab5ac41
parente519e20ae16e24438c0be0d3bc6eed953a55d9ed
network,udev: refuse .link and .network settings with no matches

Two releases ago we started warning about this, and I think it is now to turn
this into a hard error. People get bitten by this every once in a while, and
there doesn't see to be any legitimate use case where the same .link or
.network files should be applied to _all_ interfaces, since in particular that
configuration would apply both to lo and any other interfaces. And if for
whatever reason that is actually desired, OriginalName=* or Name=* can be
easily added to silence the warning and achieve the effect.

(The case described in #12098 is particularly nasty: 'echo -n >foo.network'
creates a mask file, 'echo >foo.network' creates a "match all" file.)

Fixes #717, #12098 for realz now.
src/network/networkd-network.c
src/udev/net/link-config.c