summaryrefslogtreecommitdiff
path: root/regress/sbin
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2006-11-07 05:31:27 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2006-11-07 05:31:27 +0000
commitc9b0720691a3741b4cf9a38b0545e359722a1091 (patch)
tree116a8e94ab3e7ac1870788b4fce7cc90653b0cc3 /regress/sbin
parent5c3dba0a64f0fd0865f1c6550a3a97ad69439011 (diff)
Add test for -a with nested anchors.
Diffstat (limited to 'regress/sbin')
-rw-r--r--regress/sbin/pfctl/Makefile4
-rw-r--r--regress/sbin/pfctl/pfopt6.in28
-rw-r--r--regress/sbin/pfctl/pfopt6.ok26
-rw-r--r--regress/sbin/pfctl/pfopt6.opts1
4 files changed, 57 insertions, 2 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 632918880b1..b3633a0f693 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.192 2006/11/07 01:14:17 mcbride Exp $
+# $OpenBSD: Makefile,v 1.193 2006/11/07 05:31:26 mcbride Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok
@@ -28,7 +28,7 @@ PFALTQ=1 2 3 4 5 6 7 8 9 10 11 12 13 14
# only testing parser, load test would be useless
# PFLOAD+=6 22 41 50 52 53 55 57 83 85 86
PFTABLE=1 2 3 4 5 6 7 8 9 10 11 12 13
-PFOPT=1 2 3 4 5
+PFOPT=1 2 3 4 5 6
PFIF2IP=1 2 3
PFCHKSUM=1 2 3
diff --git a/regress/sbin/pfctl/pfopt6.in b/regress/sbin/pfctl/pfopt6.in
new file mode 100644
index 00000000000..22b002a7f8d
--- /dev/null
+++ b/regress/sbin/pfctl/pfopt6.in
@@ -0,0 +1,28 @@
+anchor { # testing comments
+ anchor in {
+ pass quick
+ }
+ # silly nesting
+ anchor out {
+ anchor in {
+ anchor out {
+ anchor in {
+ anchor out {
+ anchor in {
+ anchor out {
+ anchor in {
+ pass
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ pass in on tun1000000
+ anchor foo on tun1000000 {
+ pass
+ }
+} # comment after closing brace
+
diff --git a/regress/sbin/pfctl/pfopt6.ok b/regress/sbin/pfctl/pfopt6.ok
new file mode 100644
index 00000000000..43720c1afa2
--- /dev/null
+++ b/regress/sbin/pfctl/pfopt6.ok
@@ -0,0 +1,26 @@
+anchor all {
+ anchor in all {
+ pass quick all flags S/SA keep state
+ }
+ anchor out all {
+ anchor in all {
+ anchor out all {
+ anchor in all {
+ anchor out all {
+ anchor in all {
+ anchor out all {
+ anchor in all {
+ pass all flags S/SA keep state
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ pass in on tun1000000 all flags S/SA keep state
+ anchor "foo" on tun1000000 all {
+ pass all flags S/SA keep state
+ }
+}
diff --git a/regress/sbin/pfctl/pfopt6.opts b/regress/sbin/pfctl/pfopt6.opts
new file mode 100644
index 00000000000..1205cee6be9
--- /dev/null
+++ b/regress/sbin/pfctl/pfopt6.opts
@@ -0,0 +1 @@
+-a regress/regress