[openssh-commits] [openssh] 01/01: skip IPv6-related portions on hosts without IPv6

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 30 16:06:06 AEST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 52fb6b9b034fcfd24bf88cc7be313e9c31de9889
Author: Damien Miller <djm at mindrot.org>
Date:   Tue Jun 30 16:05:40 2015 +1000

    skip IPv6-related portions on hosts without IPv6
    
    with Tim Rice
---
 regress/cfgparse.sh | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/regress/cfgparse.sh b/regress/cfgparse.sh
index 7f377d8..736f389 100644
--- a/regress/cfgparse.sh
+++ b/regress/cfgparse.sh
@@ -3,6 +3,11 @@
 
 tid="config parse"
 
+# This is a reasonable proxy for IPv6 support.
+if ! config_defined HAVE_STRUCT_IN6_ADDR ; then
+	SKIP_IPV6=yes
+fi
+
 # We need to use the keys generated for the regression test because sshd -T
 # will fail if we're not running with SUDO (no permissions for real keys) or
 # if we are # running tests on a system that has never had sshd installed
@@ -26,9 +31,12 @@ verbose "listenaddress order"
 cat > $OBJ/sshd_config.0 <<EOD
 listenaddress 1.2.3.4:1234
 listenaddress 1.2.3.4:5678
+EOD
+[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.0 <<EOD
 listenaddress [::1]:1234
 listenaddress [::1]:5678
 EOD
+
 # test input sets.  should all result in the output above.
 # test 1: addressfamily and port first
 cat > $OBJ/sshd_config.1 <<EOD
@@ -37,8 +45,11 @@ addressfamily any
 port 1234
 port 5678
 listenaddress 1.2.3.4
+EOD
+[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.1 <<EOD
 listenaddress ::1
 EOD
+
 ($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
  grep 'listenaddress ' >$OBJ/sshd_config.2 &&
  diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
@@ -47,11 +58,14 @@ EOD
 cat > $OBJ/sshd_config.1 <<EOD
 ${SSHD_KEYS}
 listenaddress 1.2.3.4
-listenaddress ::1
 port 1234
 port 5678
 addressfamily any
 EOD
+[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.1 <<EOD
+listenaddress ::1
+EOD
+
 ($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
  grep 'listenaddress ' >$OBJ/sshd_config.2 &&
  diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list