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 60f63ef7b..19071c1bc 100644
--- a/sshd.c
+++ b/sshd.c
@@ -956,7 +956,12 @@ main(int ac, char **av)
956 /* ignored */ 956 /* ignored */
957 break; 957 break;
958 case 'q': 958 case 'q':
959 options.log_level = SYSLOG_LEVEL_QUIET; 959 if (options.log_level == SYSLOG_LEVEL_QUIET) {
960 options.log_level = SYSLOG_LEVEL_SILENT;
961 }
962 else if (options.log_level != SYSLOG_LEVEL_SILENT) {
963 options.log_level = SYSLOG_LEVEL_QUIET;
964 }
960 break; 965 break;
961 case 'b': 966 case 'b':
962 options.server_key_bits = atoi(optarg); 967 options.server_key_bits = atoi(optarg);
@@ -1303,7 +1308,7 @@ main(int ac, char **av)
1303 1308
1304 /* Bind the socket to the desired port. */ 1309 /* Bind the socket to the desired port. */
1305 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { 1310 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1306 if (!ai->ai_next) 1311 if (!num_listen_socks && !ai->ai_next)
1307 error("Bind to port %s on %s failed: %.200s.", 1312 error("Bind to port %s on %s failed: %.200s.",
1308 strport, ntop, strerror(errno)); 1313 strport, ntop, strerror(errno));
1309 close(listen_sock); 1314 close(listen_sock);
@@ -1627,7 +1632,7 @@ main(int ac, char **av)
1627 * Register our connection. This turns encryption off because we do 1632 * Register our connection. This turns encryption off because we do
1628 * not have a key. 1633 * not have a key.
1629 */ 1634 */
1630 packet_set_connection(sock_in, sock_out); 1635 packet_set_connection(sock_in, sock_out, -1);
1631 1636
1632 remote_port = get_remote_port(); 1637 remote_port = get_remote_port();
1633 remote_ip = get_remote_ipaddr(); 1638 remote_ip = get_remote_ipaddr();