about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorFabian Möller <fabianm88@gmail.com>2024-03-06 09:11:54 +0100
committerFabian Möller <fabianm88@gmail.com>2024-03-06 09:11:54 +0100
commitf753e58e6ec33dc93e8e319c03bad049d9b5a5b4 (patch)
treef08f6535eb09e9b9bc5108df534e52e221dad9ac /nixos/modules
parent4f8234318e4af9cedaaeb48a4968cceeb2b53688 (diff)
downloadnixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.tar
nixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.tar.gz
nixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.tar.bz2
nixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.tar.lz
nixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.tar.xz
nixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.tar.zst
nixlib-f753e58e6ec33dc93e8e319c03bad049d9b5a5b4.zip
nixos/networkd: allow RoutingPolicyRule port ranges
Linux and Systemd allow port ranges to be used in routing policy rules.

https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#SourcePort=
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/system/boot/networkd.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 88d6a2ded873..63820bdb61d9 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -729,8 +729,8 @@ let
         (assertInt "FirewallMark")
         (assertRange "FirewallMark" 1 4294967295)
         (assertInt "Priority")
-        (assertPort "SourcePort")
-        (assertPort "DestinationPort")
+        (assertPortOrPortRange "SourcePort")
+        (assertPortOrPortRange "DestinationPort")
         (assertValueOneOf "InvertRule" boolValues)
         (assertValueOneOf "Family" ["ipv4" "ipv6" "both"])
         (assertInt "SuppressPrefixLength")