diff options
author | 2005-08-06 10:03:12 +0000 | |
---|---|---|
committer | 2005-08-06 10:03:12 +0000 | |
commit | 529e38bf9365b27b81d574c3d034c995a537d7bd (patch) | |
tree | cbae852eb0d7dba3fd134e49e7e0ab837df92b23 | |
parent | In cache_flush(), after testing for curproc != NULL, do not use curproc (diff) | |
download | wireguard-openbsd-529e38bf9365b27b81d574c3d034c995a537d7bd.tar.xz wireguard-openbsd-529e38bf9365b27b81d574c3d034c995a537d7bd.zip |
Unbreak sshd ListenAddress for bare IPv6 addresses.
Report from Janusz Mucka; ok djm@
-rw-r--r-- | usr.bin/ssh/servconf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 7207b1072bd..76e50eb0d8c 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/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" @@ -476,6 +476,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", |