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 851fad4be..904629e95 100644
--- a/sshd.c
+++ b/sshd.c
@@ -860,7 +860,12 @@ main(int ac, char **av)
860 /* ignored */ 860 /* ignored */
861 break; 861 break;
862 case 'q': 862 case 'q':
863 options.log_level = SYSLOG_LEVEL_QUIET; 863 if (options.log_level == SYSLOG_LEVEL_QUIET) {
864 options.log_level = SYSLOG_LEVEL_SILENT;
865 }
866 else if (options.log_level != SYSLOG_LEVEL_SILENT) {
867 options.log_level = SYSLOG_LEVEL_QUIET;
868 }
864 break; 869 break;
865 case 'b': 870 case 'b':
866 options.server_key_bits = atoi(optarg); 871 options.server_key_bits = atoi(optarg);
@@ -1151,7 +1156,7 @@ main(int ac, char **av)
1151 1156
1152 /* Bind the socket to the desired port. */ 1157 /* Bind the socket to the desired port. */
1153 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { 1158 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1154 if (!ai->ai_next) 1159 if (!num_listen_socks && !ai->ai_next)
1155 error("Bind to port %s on %s failed: %.200s.", 1160 error("Bind to port %s on %s failed: %.200s.",
1156 strport, ntop, strerror(errno)); 1161 strport, ntop, strerror(errno));
1157 close(listen_sock); 1162 close(listen_sock);
@@ -1414,7 +1419,7 @@ main(int ac, char **av)
1414 * Register our connection. This turns encryption off because we do 1419 * Register our connection. This turns encryption off because we do
1415 * not have a key. 1420 * not have a key.
1416 */ 1421 */
1417 packet_set_connection(sock_in, sock_out); 1422 packet_set_connection(sock_in, sock_out, -1);
1418 1423
1419 remote_port = get_remote_port(); 1424 remote_port = get_remote_port();
1420 remote_ip = get_remote_ipaddr(); 1425 remote_ip = get_remote_ipaddr();