summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index 47df9caf1..92fab6ccd 100644
--- a/sshd.c
+++ b/sshd.c
@@ -870,7 +870,12 @@ main(int ac, char **av)
870 /* ignored */ 870 /* ignored */
871 break; 871 break;
872 case 'q': 872 case 'q':
873 options.log_level = SYSLOG_LEVEL_QUIET; 873 if (options.log_level == SYSLOG_LEVEL_QUIET) {
874 options.log_level = SYSLOG_LEVEL_SILENT;
875 }
876 else if (options.log_level != SYSLOG_LEVEL_SILENT) {
877 options.log_level = SYSLOG_LEVEL_QUIET;
878 }
874 break; 879 break;
875 case 'b': 880 case 'b':
876 options.server_key_bits = atoi(optarg); 881 options.server_key_bits = atoi(optarg);
@@ -1164,7 +1169,7 @@ main(int ac, char **av)
1164 1169
1165 /* Bind the socket to the desired port. */ 1170 /* Bind the socket to the desired port. */
1166 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { 1171 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1167 if (!ai->ai_next) 1172 if (!num_listen_socks && !ai->ai_next)
1168 error("Bind to port %s on %s failed: %.200s.", 1173 error("Bind to port %s on %s failed: %.200s.",
1169 strport, ntop, strerror(errno)); 1174 strport, ntop, strerror(errno));
1170 close(listen_sock); 1175 close(listen_sock);
@@ -1424,7 +1429,7 @@ main(int ac, char **av)
1424 * Register our connection. This turns encryption off because we do 1429 * Register our connection. This turns encryption off because we do
1425 * not have a key. 1430 * not have a key.
1426 */ 1431 */
1427 packet_set_connection(sock_in, sock_out); 1432 packet_set_connection(sock_in, sock_out, -1);
1428 1433
1429 remote_port = get_remote_port(); 1434 remote_port = get_remote_port();
1430 remote_ip = get_remote_ipaddr(); 1435 remote_ip = get_remote_ipaddr();