nixos/networkd: remove CriticalConnection= fields in favor of KeepConnection

Systemd upstream has deprecated CriticalConnection with v244 in favor of
KeepConnection as that seems to be more flexible:

  The CriticalConnection= setting in .network files is now deprecated,
  and replaced by a new KeepConfiguration= setting which allows more
  detailed configuration of the IP configuration to keep in place.
This commit is contained in:
Andreas Rammhold
2020-05-01 13:33:53 +02:00
parent 0bdc8d7a58
commit 7b78f0f098
2 changed files with 13 additions and 3 deletions
@@ -290,6 +290,16 @@ environment.systemPackages = [
has been set to <literal>true</literal>. has been set to <literal>true</literal>.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The <literal>systemd-networkd</literal> option
<literal>systemd.network.networks.&lt;name&gt;.dhcp.CriticalConnection</literal>
has been removed following upstream systemd's deprecation of the same. It is recommended to use
<literal>systemd.network.networks.&lt;name&gt;.networkConfig.KeepConfiguration</literal> instead.
See <citerefentry><refentrytitle>systemd.network</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>
+3 -3
View File
@@ -205,7 +205,7 @@ let
"IPv6HopLimit" "IPv4ProxyARP" "IPv6ProxyNDP" "IPv6ProxyNDPAddress" "IPv6HopLimit" "IPv4ProxyARP" "IPv6ProxyNDP" "IPv6ProxyNDPAddress"
"IPv6PrefixDelegation" "IPv6MTUBytes" "Bridge" "Bond" "VRF" "VLAN" "IPv6PrefixDelegation" "IPv6MTUBytes" "Bridge" "Bond" "VRF" "VLAN"
"IPVLAN" "MACVLAN" "VXLAN" "Tunnel" "ActiveSlave" "PrimarySlave" "IPVLAN" "MACVLAN" "VXLAN" "Tunnel" "ActiveSlave" "PrimarySlave"
"ConfigureWithoutCarrier" "Xfrm" "ConfigureWithoutCarrier" "Xfrm" "KeepConfiguration"
]) ])
# Note: For DHCP the values both, none, v4, v6 are deprecated # Note: For DHCP the values both, none, v4, v6 are deprecated
(assertValueOneOf "DHCP" ["yes" "no" "ipv4" "ipv6" "both" "none" "v4" "v6"]) (assertValueOneOf "DHCP" ["yes" "no" "ipv4" "ipv6" "both" "none" "v4" "v6"])
@@ -228,6 +228,7 @@ let
(assertValueOneOf "ActiveSlave" boolValues) (assertValueOneOf "ActiveSlave" boolValues)
(assertValueOneOf "PrimarySlave" boolValues) (assertValueOneOf "PrimarySlave" boolValues)
(assertValueOneOf "ConfigureWithoutCarrier" boolValues) (assertValueOneOf "ConfigureWithoutCarrier" boolValues)
(assertValueOneOf "KeepConfiguration" (boolValues ++ ["static" "dhcp-on-stop" "dhcp"]))
]; ];
checkAddress = checkUnitConfig "Address" [ checkAddress = checkUnitConfig "Address" [
@@ -277,7 +278,7 @@ let
checkDhcp = checkUnitConfig "DHCP" [ checkDhcp = checkUnitConfig "DHCP" [
(assertOnlyFields [ (assertOnlyFields [
"UseDNS" "RoutesToDNS" "UseNTP" "UseMTU" "Anonymize" "SendHostname" "UseHostname" "UseDNS" "RoutesToDNS" "UseNTP" "UseMTU" "Anonymize" "SendHostname" "UseHostname"
"Hostname" "UseDomains" "UseRoutes" "UseTimezone" "CriticalConnection" "Hostname" "UseDomains" "UseRoutes" "UseTimezone"
"ClientIdentifier" "VendorClassIdentifier" "UserClass" "DUIDType" "ClientIdentifier" "VendorClassIdentifier" "UserClass" "DUIDType"
"DUIDRawData" "IAID" "RequestBroadcast" "RouteMetric" "RouteTable" "DUIDRawData" "IAID" "RequestBroadcast" "RouteMetric" "RouteTable"
"ListenPort" "RapidCommit" "ListenPort" "RapidCommit"
@@ -292,7 +293,6 @@ let
(assertValueOneOf "UseDomains" ["yes" "no" "route"]) (assertValueOneOf "UseDomains" ["yes" "no" "route"])
(assertValueOneOf "UseRoutes" boolValues) (assertValueOneOf "UseRoutes" boolValues)
(assertValueOneOf "UseTimezone" boolValues) (assertValueOneOf "UseTimezone" boolValues)
(assertValueOneOf "CriticalConnection" boolValues)
(assertValueOneOf "RequestBroadcast" boolValues) (assertValueOneOf "RequestBroadcast" boolValues)
(assertInt "RouteTable") (assertInt "RouteTable")
(assertMinimum "RouteTable" 0) (assertMinimum "RouteTable" 0)