system: weirdness in port parsing that we don't use; closes #5182

This commit is contained in:
Franco Fichtner 2021-09-01 14:09:18 +02:00
parent 53cd1c7183
commit 6651a03a18

View File

@ -219,11 +219,16 @@ function openssh_configure_do($verbose = false, $interface = '')
continue;
}
if (count($listeners) < 16) {
$listeners[] = $tmpaddr;
} else {
if (count($listeners) >= 16) {
log_error("The SSH listening address $tmpaddr cannot be added due to MAX_LISTEN_SOCKS limit reached.");
continue;
}
if ($info['family'] == 'inet6') {
$tmpaddr = "[$tmpaddr]";
}
$listeners[] = $tmpaddr;
}
foreach ($listeners as $listener) {