sshd: Use top-level ports in config check when needed
Previously, if a listenAddress was specified without a `port`, the check would fail.
This commit is contained in:
parent
fa5d6d1a6c
commit
e797aaea0b
1 changed files with 5 additions and 1 deletions
|
@ -674,7 +674,11 @@ in
|
|||
(lport: "sshd -G -T -C lport=${toString lport} -f ${sshconf} > /dev/null")
|
||||
cfg.ports}
|
||||
${concatMapStringsSep "\n"
|
||||
(la: "sshd -G -T -C ${escapeShellArg "laddr=${la.addr},lport=${toString la.port}"} -f ${sshconf} > /dev/null")
|
||||
(la:
|
||||
concatMapStringsSep "\n"
|
||||
(port: "sshd -G -T -C ${escapeShellArg "laddr=${la.addr},lport=${toString port}"} -f ${sshconf} > /dev/null")
|
||||
(if la.port != null then [ la.port ] else cfg.ports)
|
||||
)
|
||||
cfg.listenAddresses}
|
||||
touch $out
|
||||
'')
|
||||
|
|
Loading…
Reference in a new issue