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 11d618d11..a2e0e9320 100644
--- a/sshd.c
+++ b/sshd.c
@@ -949,7 +949,12 @@ main(int ac, char **av)
949 /* ignored */ 949 /* ignored */
950 break; 950 break;
951 case 'q': 951 case 'q':
952 options.log_level = SYSLOG_LEVEL_QUIET; 952 if (options.log_level == SYSLOG_LEVEL_QUIET) {
953 options.log_level = SYSLOG_LEVEL_SILENT;
954 }
955 else if (options.log_level != SYSLOG_LEVEL_SILENT) {
956 options.log_level = SYSLOG_LEVEL_QUIET;
957 }
953 break; 958 break;
954 case 'b': 959 case 'b':
955 options.server_key_bits = atoi(optarg); 960 options.server_key_bits = atoi(optarg);
@@ -1300,7 +1305,7 @@ main(int ac, char **av)
1300 1305
1301 /* Bind the socket to the desired port. */ 1306 /* Bind the socket to the desired port. */
1302 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { 1307 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1303 if (!ai->ai_next) 1308 if (!num_listen_socks && !ai->ai_next)
1304 error("Bind to port %s on %s failed: %.200s.", 1309 error("Bind to port %s on %s failed: %.200s.",
1305 strport, ntop, strerror(errno)); 1310 strport, ntop, strerror(errno));
1306 close(listen_sock); 1311 close(listen_sock);
@@ -1625,7 +1630,7 @@ main(int ac, char **av)
1625 * Register our connection. This turns encryption off because we do 1630 * Register our connection. This turns encryption off because we do
1626 * not have a key. 1631 * not have a key.
1627 */ 1632 */
1628 packet_set_connection(sock_in, sock_out); 1633 packet_set_connection(sock_in, sock_out, -1);
1629 1634
1630 remote_port = get_remote_port(); 1635 remote_port = get_remote_port();
1631 remote_ip = get_remote_ipaddr(); 1636 remote_ip = get_remote_ipaddr();