summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-10-16 21:36:13 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-10-16 21:36:13 +0000
commit51f47642b89ec86de2ecb6e86c2d3c1242624c50 (patch)
tree5b3ef07c5772e1e48e1a1811f5d646e2ae5dc22f
parent4fe8262213dd62c22525976f92fd88ccbadaf72d (diff)
Regression tests for "any" keyword.
-rw-r--r--regress/sbin/ipsecctl/Makefile8
-rw-r--r--regress/sbin/ipsecctl/ike8.in1
-rw-r--r--regress/sbin/ipsecctl/ike8.ok18
-rw-r--r--regress/sbin/ipsecctl/ipsec13.in1
-rw-r--r--regress/sbin/ipsecctl/ipsec13.ok4
-rw-r--r--regress/sbin/ipsecctl/sa7.in3
-rw-r--r--regress/sbin/ipsecctl/sa7.ok6
7 files changed, 37 insertions, 4 deletions
diff --git a/regress/sbin/ipsecctl/Makefile b/regress/sbin/ipsecctl/Makefile
index 7e961f70360..c7c1f111d37 100644
--- a/regress/sbin/ipsecctl/Makefile
+++ b/regress/sbin/ipsecctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2005/09/05 08:50:47 hshoexer Exp $
+# $OpenBSD: Makefile,v 1.8 2005/10/16 21:36:12 hshoexer Exp $
# TARGETS
# ipsec: feed ipsecNN.in through ipsecctl and check wether the output matches
@@ -7,10 +7,10 @@
# sa: same as above, but for SA rules.
# ike: same as above, but for ike rules.
-IPSECTESTS=1 2 3 4 5 6 7 8 9 10 11 12
+IPSECTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13
TCPMD5TESTS=1 2 3
-SATESTS=1 2 3 4 5 6
-IKETESTS=1 2 3 4 5 6 7
+SATESTS=1 2 3 4 5 6 7
+IKETESTS=1 2 3 4 5 6 7 8
SHELL=/bin/sh
diff --git a/regress/sbin/ipsecctl/ike8.in b/regress/sbin/ipsecctl/ike8.in
new file mode 100644
index 00000000000..6eb53021735
--- /dev/null
+++ b/regress/sbin/ipsecctl/ike8.in
@@ -0,0 +1 @@
+ike from 1.1.1.1 to any peer 192.168.3.1
diff --git a/regress/sbin/ipsecctl/ike8.ok b/regress/sbin/ipsecctl/ike8.ok
new file mode 100644
index 00000000000..93b9fe8983a
--- /dev/null
+++ b/regress/sbin/ipsecctl/ike8.ok
@@ -0,0 +1,18 @@
+C set [Phase 1]:192.168.3.1=peer-192.168.3.1 force
+C set [peer-192.168.3.1]:Phase=1 force
+C set [peer-192.168.3.1]:Address=192.168.3.1 force
+C set [IPsec-1.1.1.1-0.0.0.0/0]:Phase=2 force
+C set [IPsec-1.1.1.1-0.0.0.0/0]:ISAKMP-peer=peer-192.168.3.1 force
+C set [IPsec-1.1.1.1-0.0.0.0/0]:Configuration=qm-1.1.1.1-0.0.0.0/0 force
+C set [IPsec-1.1.1.1-0.0.0.0/0]:Local-ID=lid-1.1.1.1 force
+C set [IPsec-1.1.1.1-0.0.0.0/0]:Remote-ID=rid-0.0.0.0/0 force
+C set [qm-1.1.1.1-0.0.0.0/0]:EXCHANGE_TYPE=QUICK_MODE force
+C set [qm-1.1.1.1-0.0.0.0/0]:Suites=QM-ESP-AES-SHA2-256-PFS-SUITE force
+C set [lid-1.1.1.1]:ID-type=IPV4_ADDR force
+C set [lid-1.1.1.1]:Address=1.1.1.1 force
+C set [rid-0.0.0.0/0]:ID-type=IPV4_ADDR_SUBNET force
+C set [rid-0.0.0.0/0]:Network=0.0.0.0 force
+C set [rid-0.0.0.0/0]:Netmask=0.0.0.0 force
+C add [Phase 2]:Connections=IPsec-1.1.1.1-0.0.0.0/0
+t IPsec-1.1.1.1-0.0.0.0/0
+c IPsec-1.1.1.1-0.0.0.0/0
diff --git a/regress/sbin/ipsecctl/ipsec13.in b/regress/sbin/ipsecctl/ipsec13.in
new file mode 100644
index 00000000000..145fe01dda4
--- /dev/null
+++ b/regress/sbin/ipsecctl/ipsec13.in
@@ -0,0 +1 @@
+flow esp from 1.1.1.1 to any peer 2.2.2.2
diff --git a/regress/sbin/ipsecctl/ipsec13.ok b/regress/sbin/ipsecctl/ipsec13.ok
new file mode 100644
index 00000000000..a575a6214d3
--- /dev/null
+++ b/regress/sbin/ipsecctl/ipsec13.ok
@@ -0,0 +1,4 @@
+flow esp out from 1.1.1.1 to 0.0.0.0/0 peer 2.2.2.2
+ type require
+flow esp in from 0.0.0.0/0 to 1.1.1.1 peer 2.2.2.2
+ type use
diff --git a/regress/sbin/ipsecctl/sa7.in b/regress/sbin/ipsecctl/sa7.in
new file mode 100644
index 00000000000..7fcad9a812d
--- /dev/null
+++ b/regress/sbin/ipsecctl/sa7.in
@@ -0,0 +1,3 @@
+esp from 1.1.1.1 to any spi 0xdeadbeef:0xbeefdead \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa7.ok b/regress/sbin/ipsecctl/sa7.ok
new file mode 100644
index 00000000000..9ae6d4ab760
--- /dev/null
+++ b/regress/sbin/ipsecctl/sa7.ok
@@ -0,0 +1,6 @@
+esp from 1.1.1.1 to 0.0.0.0/0 spi 0xdeadbeef auth hmac-sha2-256 enc aesctr
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 0.0.0.0/0 to 1.1.1.1 spi 0xbeefdead auth hmac-sha2-256 enc aesctr
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee