Index: sshd.8
===================================================================
RCS file: /cvs/openssh/sshd.8,v
retrieving revision 1.169
diff -u -r1.169 sshd.8
--- sshd.8	13 Dec 2005 08:29:03 -0000	1.169
+++ sshd.8	16 Dec 2005 21:29:56 -0000
@@ -288,8 +288,8 @@
 Specifies the port on which the server listens for connections
 (default 22).
 Multiple port options are permitted.
-Ports specified in the configuration file are ignored when a
-command-line port is specified.
+Ports specified in the configuration file are ignored
+when command-line ports are specified.
 .It Fl q
 Quiet mode.
 Nothing is sent to the system log.
Index: sshd.c
===================================================================
RCS file: /cvs/openssh/sshd.c,v
retrieving revision 1.319
diff -u -r1.319 sshd.c
--- sshd.c	5 Nov 2005 04:15:00 -0000	1.319
+++ sshd.c	16 Dec 2005 21:30:03 -0000
@@ -975,7 +975,6 @@
 			options.server_key_bits = atoi(optarg);
 			break;
 		case 'p':
-			options.ports_from_cmdline = 1;
 			if (options.num_ports >= MAX_PORTS) {
 				fprintf(stderr, "too many ports.\n");
 				exit(1);
@@ -1028,6 +1027,8 @@
 			break;
 		}
 	}
+	if (options.num_ports > 0)
+		options.ports_from_cmdline = 1;
 	if (rexeced_flag || inetd_flag)
 		rexec_flag = 0;
 	if (rexec_flag && (av[0] == NULL || *av[0] != '/'))
Index: sshd_config.5
===================================================================
RCS file: /cvs/openssh/sshd_config.5,v
retrieving revision 1.52
diff -u -r1.52 sshd_config.5
--- sshd_config.5	13 Dec 2005 08:33:20 -0000	1.52
+++ sshd_config.5	16 Dec 2005 21:30:05 -0000
@@ -542,6 +542,8 @@
 Multiple options of this type are permitted.
 See also
 .Cm ListenAddress .
+Ports specified in the configuration file are ignored
+when command-line ports are specified.
 .It Cm PrintLastLog
 Specifies whether
 .Nm sshd



