From 203c70579eb87f8fd012a5ab2cad8635e3260e59 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 12 Aug 2005 22:11:37 +1000 Subject: [PATCH] - dtucker@cvs.openbsd.org 2005/08/06 10:03:12 [servconf.c] Unbreak sshd ListenAddress for bare IPv6 addresses. --- ChangeLog | 5 ++++- servconf.c | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 874a38fd7..42c6f368e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ - djm@cvs.openbsd.org 2005/07/30 02:03:47 [readconf.c] 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 - (dtucker) [configure.ac] Test libedit library and headers for compatibility. @@ -2920,4 +2923,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (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 $ diff --git a/servconf.c b/servconf.c index 7ef7b234e..9e420a527 100644 --- a/servconf.c +++ b/servconf.c @@ -10,7 +10,7 @@ */ #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 "log.h" @@ -517,6 +517,12 @@ parse_time: if (arg == NULL || *arg == '\0') fatal("%s line %d: missing address", 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); if (p == NULL) fatal("%s line %d: bad address:port usage",