]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-network.h
network: add ActivationPolicy= configuration parameter
authorDan Streetman <ddstreet@canonical.com>
Thu, 18 Jun 2020 20:09:40 +0000 (16:09 -0400)
committerDan Streetman <ddstreet@canonical.com>
Thu, 21 Jan 2021 16:49:43 +0000 (11:49 -0500)
commit61135582e0b2e847e49c96af05e4d101323ce00c
tree61013d0f037248e2ccc448af4c8ee1d1f3535ea4
parentfee6441601c979165ebcbb35472036439f8dad5f
network: add ActivationPolicy= configuration parameter

This parameter allows configuring the activation policy for an interface,
meaning how it manages the interface's administrative state (IFF_UP flag).
The policy can be configured to bring the interface either up or down when
the interface is (re)configured, to always force the interface either up or
down, or to never change the interface administrative state.

If the interface is bound with BindCarrier=, its administrative state is
controlled by the interface(s) it's bound to, and this parameter is forced
to 'bound'.

This changes the default behavior of how systemd-networkd sets the IFF_UP
flag; previously, it was set up (if not already up) every time the
link_joined() function was called. Now, with the default ActivationPolicy=
setting of 'up', it will only set the IFF_UP flag once, the first time
link_joined() is called, during an interface's configuration; and on
the first link_joined() call each time the interface is reconfigured.

Fixes: #3031
Fixes: #17437
man/systemd.network.xml
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
test/fuzz/fuzz-network-parser/directives.network