mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 20:14:37 +00:00
nixos/kresd: fix port only regex
The output is expected to be a list [ hostname, port, optional ipv6 scope ], but the current regex only outputs [ port ], when only a port is given as address.
This commit is contained in:
parent
f3c54970ec
commit
9abc79018c
@ -11,7 +11,7 @@ let
|
||||
mkListen = kind: addr: let
|
||||
al_v4 = builtins.match "([0-9.]+):([0-9]+)($)" addr;
|
||||
al_v6 = builtins.match "\\[(.+)]:([0-9]+)(%.*|$)" addr;
|
||||
al_portOnly = builtins.match "([0-9]+)" addr;
|
||||
al_portOnly = builtins.match "(^)([0-9]+)" addr;
|
||||
al = findFirst (a: a != null)
|
||||
(throw "services.kresd.*: incorrect address specification '${addr}'")
|
||||
[ al_v4 al_v6 al_portOnly ];
|
||||
|
Loading…
Reference in New Issue
Block a user