Merge #156867: nixos/kresd: Fix invalid regular expression

The problem has only been confirmed to occur on *-darwin.
This commit is contained in:
Vladimír Čunát 2022-01-26 16:48:09 +01:00
commit 64ba84897b
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -9,7 +9,7 @@ let
# On Nix level we don't attempt to precisely validate the address specifications.
# The optional IPv6 scope spec comes *after* port, perhaps surprisingly.
mkListen = kind: addr: let
al_v4 = builtins.match "([0-9.]+):([0-9]+)()" addr;
al_v4 = builtins.match "([0-9.]+):([0-9]+)($)" addr;
al_v6 = builtins.match "\\[(.+)]:([0-9]+)(%.*|$)" addr;
al_portOnly = builtins.match "([0-9]+)" addr;
al = findFirst (a: a != null)