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 0f2b2a3ce..d49973859 100644
--- a/sshd.c
+++ b/sshd.c
@@ -878,7 +878,12 @@ main(int ac, char **av)
878 /* ignored */ 878 /* ignored */
879 break; 879 break;
880 case 'q': 880 case 'q':
881 options.log_level = SYSLOG_LEVEL_QUIET; 881 if (options.log_level == SYSLOG_LEVEL_QUIET) {
882 options.log_level = SYSLOG_LEVEL_SILENT;
883 }
884 else if (options.log_level != SYSLOG_LEVEL_SILENT) {
885 options.log_level = SYSLOG_LEVEL_QUIET;
886 }
882 break; 887 break;
883 case 'b': 888 case 'b':
884 options.server_key_bits = atoi(optarg); 889 options.server_key_bits = atoi(optarg);
@@ -1176,7 +1181,7 @@ main(int ac, char **av)
1176 1181
1177 /* Bind the socket to the desired port. */ 1182 /* Bind the socket to the desired port. */
1178 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { 1183 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1179 if (!ai->ai_next) 1184 if (!num_listen_socks && !ai->ai_next)
1180 error("Bind to port %s on %s failed: %.200s.", 1185 error("Bind to port %s on %s failed: %.200s.",
1181 strport, ntop, strerror(errno)); 1186 strport, ntop, strerror(errno));
1182 close(listen_sock); 1187 close(listen_sock);
@@ -1433,7 +1438,7 @@ main(int ac, char **av)
1433 * Register our connection. This turns encryption off because we do 1438 * Register our connection. This turns encryption off because we do
1434 * not have a key. 1439 * not have a key.
1435 */ 1440 */
1436 packet_set_connection(sock_in, sock_out); 1441 packet_set_connection(sock_in, sock_out, -1);
1437 1442
1438 remote_port = get_remote_port(); 1443 remote_port = get_remote_port();
1439 remote_ip = get_remote_ipaddr(); 1444 remote_ip = get_remote_ipaddr();