Merge pull request #275633 from chreekat/b/sshd-config-check

sshd: Use top-level ports in config check when needed
This commit is contained in:
Maximilian Bosch 2024-01-03 16:25:08 +01:00 committed by GitHub
commit cfd8c0ddd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
'')