[servconf.c]
     Unbreak sshd ListenAddress for bare IPv6 addresses.
This commit is contained in:
Damien Miller 2005-08-12 22:11:37 +10:00
parent 43f6db64ff
commit 203c70579e
2 changed files with 11 additions and 2 deletions

View File

@ -10,6 +10,9 @@
- djm@cvs.openbsd.org 2005/07/30 02:03:47 - djm@cvs.openbsd.org 2005/07/30 02:03:47
[readconf.c] [readconf.c]
listen_hosts initialisation here too; spotted greg AT y2005.nest.cx listen_hosts initialisation here too; spotted greg AT y2005.nest.cx
- dtucker@cvs.openbsd.org 2005/08/06 10:03:12
[servconf.c]
Unbreak sshd ListenAddress for bare IPv6 addresses.
20050810 20050810
- (dtucker) [configure.ac] Test libedit library and headers for compatibility. - (dtucker) [configure.ac] Test libedit library and headers for compatibility.
@ -2920,4 +2923,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3868 2005/08/12 12:11:18 djm Exp $ $Id: ChangeLog,v 1.3869 2005/08/12 12:11:37 djm Exp $

View File

@ -10,7 +10,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: servconf.c,v 1.143 2005/07/25 11:59:40 markus Exp $"); RCSID("$OpenBSD: servconf.c,v 1.144 2005/08/06 10:03:12 dtucker Exp $");
#include "ssh.h" #include "ssh.h"
#include "log.h" #include "log.h"
@ -517,6 +517,12 @@ parse_time:
if (arg == NULL || *arg == '\0') if (arg == NULL || *arg == '\0')
fatal("%s line %d: missing address", fatal("%s line %d: missing address",
filename, linenum); filename, linenum);
/* check for bare IPv6 address: no "[]" and 2 or more ":" */
if (strchr(arg, '[') == NULL && (p = strchr(arg, ':')) != NULL
&& strchr(p+1, ':') != NULL) {
add_listen_addr(options, arg, 0);
break;
}
p = hpdelim(&arg); p = hpdelim(&arg);
if (p == NULL) if (p == NULL)
fatal("%s line %d: bad address:port usage", fatal("%s line %d: bad address:port usage",