diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -867,7 +867,12 @@ main(int ac, char **av) | |||
867 | /* ignored */ | 867 | /* ignored */ |
868 | break; | 868 | break; |
869 | case 'q': | 869 | case 'q': |
870 | options.log_level = SYSLOG_LEVEL_QUIET; | 870 | if (options.log_level == SYSLOG_LEVEL_QUIET) { |
871 | options.log_level = SYSLOG_LEVEL_SILENT; | ||
872 | } | ||
873 | else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
874 | options.log_level = SYSLOG_LEVEL_QUIET; | ||
875 | } | ||
871 | break; | 876 | break; |
872 | case 'b': | 877 | case 'b': |
873 | options.server_key_bits = atoi(optarg); | 878 | options.server_key_bits = atoi(optarg); |
@@ -1168,7 +1173,7 @@ main(int ac, char **av) | |||
1168 | 1173 | ||
1169 | /* Bind the socket to the desired port. */ | 1174 | /* Bind the socket to the desired port. */ |
1170 | if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { | 1175 | if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { |
1171 | if (!ai->ai_next) | 1176 | if (!num_listen_socks && !ai->ai_next) |
1172 | error("Bind to port %s on %s failed: %.200s.", | 1177 | error("Bind to port %s on %s failed: %.200s.", |
1173 | strport, ntop, strerror(errno)); | 1178 | strport, ntop, strerror(errno)); |
1174 | close(listen_sock); | 1179 | close(listen_sock); |
@@ -1428,7 +1433,7 @@ main(int ac, char **av) | |||
1428 | * Register our connection. This turns encryption off because we do | 1433 | * Register our connection. This turns encryption off because we do |
1429 | * not have a key. | 1434 | * not have a key. |
1430 | */ | 1435 | */ |
1431 | packet_set_connection(sock_in, sock_out); | 1436 | packet_set_connection(sock_in, sock_out, -1); |
1432 | 1437 | ||
1433 | remote_port = get_remote_port(); | 1438 | remote_port = get_remote_port(); |
1434 | remote_ip = get_remote_ipaddr(); | 1439 | remote_ip = get_remote_ipaddr(); |