[openssh-commits] [openssh] 02/03: upstream: Ensure that address/mask mismatches are flagged at

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Sep 9 13:12:36 AEST 2020


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

djm pushed a commit to branch master
in repository openssh.

commit 9afe2a150893b20bdf9eab764978d817b9a7b783
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Aug 28 03:17:13 2020 +0000

    upstream: Ensure that address/mask mismatches are flagged at
    
    config-check time. ok djm@
    
    OpenBSD-Regress-ID: 8f5f4c2c0bf00e6ceae7a1755a444666de0ea5c2
---
 regress/addrmatch.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/regress/addrmatch.sh b/regress/addrmatch.sh
index e7d29c3f..26e0c991 100644
--- a/regress/addrmatch.sh
+++ b/regress/addrmatch.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: addrmatch.sh,v 1.5 2020/03/13 03:18:45 djm Exp $
+#	$OpenBSD: addrmatch.sh,v 1.6 2020/08/28 03:17:13 dtucker Exp $
 #	Placed in the Public Domain.
 
 tid="address match"
@@ -52,5 +52,17 @@ run_trial user ::5 somehost ::1 1234 match3 "IP6 localaddress"
 run_trial user ::5 somehost ::2 5678 match4 "IP6 localport"
 fi
 
+#
+# Check that we catch invalid address/mask in Match Address/Localaddress
+#
+for i in 10.0.1.0/8 10.0.0.1/24 2000:aa:bb:01::/56; do
+    for a in address localaddress; do
+	verbose "test invalid Match $a $i"
+	echo "Match $a $i" > $OBJ/sshd_proxy
+	${SUDO} ${SSHD} -f $OBJ/sshd_proxy -t >/dev/null 2>&1 && \
+	    fail "accepted invalid match $a $i"
+    done
+done
+
 cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
 rm $OBJ/sshd_proxy_bak

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


More information about the openssh-commits mailing list