upstream: Use ssh -Q addressfamily to determine if IPv6 is supported.

OpenBSD-Regress-ID: 2211808223316d349ec59928d88053f3c4943555
This commit is contained in:
dtucker@openbsd.org authored and Darren Tucker committed 2026-11-02 18:32:12 +11:00
1 parent dec6e9e8ee
commit 4001f0adac
1 file changed
+2 -2
+2 -2
View File
@@ -1,4 +1,4 @@
# $OpenBSD: cfgparse.sh,v 1.13 2026/10/30 08:12:58 djm Exp $
# $OpenBSD: cfgparse.sh,v 1.14 2026/11/02 07:06:52 dtucker Exp $
# Placed in the Public Domain.
tid="sshd config parse"
@@ -24,7 +24,7 @@ verbose "reparse regress config"
# Detect IPv6 support and if found, define variables for the needed
# config lines. This allows tests to also work on Portable platforms
# lacking IPv6 support without having diffs that make syncs harder.
if $SUDO ${SSHD} -tq -f $OBJ/sshd_config_minimal -oListenAddress=::1 ; then
if ${SSH} -Qaddressfamily | grep inet6 >/dev/null; then
trace "IPv6 support detected"
LISTENADDRESS_IPV6_LOOPBACK="listenaddress ::1"
LISTENADDRESS_IPV6_LOOPBACK_1234="listenaddress [::1]:1234"