From 91135a0e8f551e7d52ff12f14c326a46d9a709f5 Mon Sep 17 00:00:00 2001 From: djm Date: Fri, 12 Aug 2005 12:11:37 +0000 Subject: [PATCH] - dtucker@cvs.openbsd.org 2005/08/06 10:03:12 [servconf.c] Unbreak sshd ListenAddress for bare IPv6 addresses. --- ChangeLog | 3 +++ servconf.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 812842a7..9cae479a 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. diff --git a/servconf.c b/servconf.c index 7ef7b234..9e420a52 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", -- 2.45.1