Unverified Commit 9abc7901 authored by Leona Maroni's avatar Leona Maroni
Browse files

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.
parent f3c54970
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 ];