nixos/networkd: add new options

Systemd 250:

> DHCPv4 client support in systemd-networkd learnt a new Label= option
> for configuring the address label to apply to configure IPv4
> addresses.

> The [IPv6AcceptRA] section of .network files gained support for a new
> UseMTU= setting that may be used to control whether to apply the
> announced MTU settings to the local interface.

> The [DHCPv4] section in .network file gained a new Use6RD= boolean
> setting to control whether the DHCPv4 client request and process the
> DHCP 6RD option.

> The [DHCPv6] section in .network file gained a new setting
> UseDelegatedPrefix= to control whether the delegated prefixes will be
> propagated to the downstream interfaces.

> The [IPv6AcceptRA] section of .network files now understands two new
> settings UseGateway=/UseRoutePrefix= for explicitly configuring
> whether to use the relevant fields from the IPv6 Router Advertisement
> records.

> The [RoutingPolicyRule] section of .network file gained a new
> SuppressInterfaceGroup= setting.

> The IgnoreCarrierLoss= setting in the [Network] section of .network
> files now allows a duration to be specified, controlling how long to
> wait before reacting to carrier loss.

Systemd 246:

> systemd-networkd's [DHCPv4] section gained a new setting UseGateway=
> which may be used to turn off use of the gateway information provided
> by the DHCP lease. A new FallbackLeaseLifetimeSec= setting may be
> used to configure how to process leases that lack a lifetime option.
This commit is contained in:
Vincent Haupert 2022-10-09 00:27:52 +02:00
parent 4367b782bc
commit 4f442dde0e

View File

@ -573,7 +573,6 @@ let
(assertValueOneOf "ActiveSlave" boolValues)
(assertValueOneOf "PrimarySlave" boolValues)
(assertValueOneOf "ConfigureWithoutCarrier" boolValues)
(assertValueOneOf "IgnoreCarrierLoss" boolValues)
(assertValueOneOf "KeepConfiguration" (boolValues ++ ["static" "dhcp-on-stop" "dhcp"]))
];
@ -618,6 +617,7 @@ let
"User"
"SuppressPrefixLength"
"Type"
"SuppressInterfaceGroup"
])
(assertInt "TypeOfService")
(assertRange "TypeOfService" 0 255)
@ -631,6 +631,7 @@ let
(assertInt "SuppressPrefixLength")
(assertRange "SuppressPrefixLength" 0 128)
(assertValueOneOf "Type" ["blackhole" "unreachable" "prohibit"])
(assertRange "SuppressInterfaceGroup" 0 2147483647)
];
sectionRoute = checkUnitConfig "Route" [
@ -710,6 +711,9 @@ let
"BlackList"
"RequestOptions"
"SendOption"
"FallbackLeaseLifetimeSec"
"Label"
"Use6RD"
])
(assertValueOneOf "UseDNS" boolValues)
(assertValueOneOf "RoutesToDNS" boolValues)
@ -732,6 +736,8 @@ let
(assertPort "ListenPort")
(assertValueOneOf "SendRelease" boolValues)
(assertValueOneOf "SendDecline" boolValues)
(assertValueOneOf "FallbackLeaseLifetimeSec" ["forever" "infinity"])
(assertValueOneOf "Use6RD" boolValues)
];
sectionDHCPv6 = checkUnitConfig "DHCPv6" [
@ -752,6 +758,7 @@ let
"DUIDType"
"DUIDRawData"
"IAID"
"UseDelegatedPrefix"
])
(assertValueOneOf "UseAddress" boolValues)
(assertValueOneOf "UseDNS" boolValues)
@ -761,6 +768,7 @@ let
(assertValueOneOf "WithoutRA" ["no" "solicit" "information-request"])
(assertRange "SendOption" 1 65536)
(assertInt "IAID")
(assertValueOneOf "UseDelegatedPrefix" boolValues)
];
sectionDHCPPrefixDelegation = checkUnitConfig "DHCPPrefixDelegation" [
@ -805,6 +813,9 @@ let
(assertValueOneOf "UseAutonomousPrefix" boolValues)
(assertValueOneOf "UseOnLinkPrefix" boolValues)
(assertValueOneOf "DHCPv6Client" (boolValues ++ ["always"]))
(assertValueOneOf "UseMTU" boolValues)
(assertValueOneOf "UseGateway" boolValues)
(assertValueOneOf "UseRoutePrefix" boolValues)
];
sectionDHCPServer = checkUnitConfig "DHCPServer" [