From 423e46a24f240a6e9a6ddcb788db51989f57eb58 Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Fri, 7 Sep 2018 01:56:46 +0300 Subject: [PATCH 1/3] nixos/networkd: support MULTICAST flag on links Support Multicast= option in [Link] section of network units, introduced in systemd/systemd#9118. --- nixos/modules/system/boot/networkd.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 4bacf0f126a..8e748dd27d7 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -249,11 +249,12 @@ let # .network files have a [Link] section with different options than in .netlink files checkNetworkLink = checkUnitConfig "Link" [ (assertOnlyFields [ - "MACAddress" "MTUBytes" "ARP" "Unmanaged" "RequiredForOnline" + "MACAddress" "MTUBytes" "ARP" "Multicast" "Unmanaged" "RequiredForOnline" ]) (assertMacAddress "MACAddress") (assertByteFormat "MTUBytes") (assertValueOneOf "ARP" boolValues) + (assertValueOneOf "Multicast" boolValues) (assertValueOneOf "Unmanaged" boolValues) (assertValueOneOf "RquiredForOnline" boolValues) ]; From 8fdb6fba30a22c15bd86fb756a49559b9e5d590c Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Fri, 7 Sep 2018 02:01:21 +0300 Subject: [PATCH 2/3] nixos/networkd: fix handling of RequiredForOnline --- nixos/modules/system/boot/networkd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 8e748dd27d7..5f1de572e5b 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -256,7 +256,7 @@ let (assertValueOneOf "ARP" boolValues) (assertValueOneOf "Multicast" boolValues) (assertValueOneOf "Unmanaged" boolValues) - (assertValueOneOf "RquiredForOnline" boolValues) + (assertValueOneOf "RequiredForOnline" boolValues) ]; From ecf73103abf1897a3121de2c7e87490b437266aa Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Fri, 7 Sep 2018 02:23:12 +0300 Subject: [PATCH 3/3] nixos/networkd: do not require gateway for routes A route via a tunnel interface does not require a gateway to be specified, so do not check for the Gateway= field on routes at all. --- nixos/modules/system/boot/networkd.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 5f1de572e5b..63a6f7fbe09 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -208,7 +208,6 @@ let "InitialCongestionWindow" "InitialAdvertisedReceiveWindow" "QuickAck" "MTUBytes" ]) - (assertHasField "Gateway") ]; checkDhcp = checkUnitConfig "DHCP" [