summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamiel Dobbelaar <camield@cvs.openbsd.org>2005-04-22 11:08:33 +0000
committerCamiel Dobbelaar <camield@cvs.openbsd.org>2005-04-22 11:08:33 +0000
commita31109983e85732faeccde4ae2bceb8c692c1dc2 (patch)
tree9a2054d9bf6707cd2118e79df676ed1959909933
parentd4b7454fab4c841cfb66100f91690f604c414fdd (diff)
test bad flag combinations
-rw-r--r--regress/sbin/pfctl/Makefile4
-rw-r--r--regress/sbin/pfctl/pfail50.in22
-rw-r--r--regress/sbin/pfctl/pfail50.ok17
3 files changed, 41 insertions, 2 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 0de313c1827..c03e6709a0b 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.185 2005/01/27 15:30:35 dhartmei Exp $
+# $OpenBSD: Makefile,v 1.186 2005/04/22 11:08:32 camield Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok
@@ -16,7 +16,7 @@ PFTESTS+=28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
PFTESTS+=51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
PFTESTS+=74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
PFFAIL=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 23 24 25 27
-PFFAIL+=28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
+PFFAIL+=28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
PFSIMPLE=1 2
PFSETUP=1 2 3 4
PFLOAD=1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29
diff --git a/regress/sbin/pfctl/pfail50.in b/regress/sbin/pfctl/pfail50.in
new file mode 100644
index 00000000000..eb2488adc78
--- /dev/null
+++ b/regress/sbin/pfctl/pfail50.in
@@ -0,0 +1,22 @@
+# pfctl should catch flags that never match, ie, where any flags
+# are tested that are always masked off. Test some more combinations
+# while we're here.
+
+pass proto tcp from any to any flags F/F
+pass proto tcp from any to any flags S/S
+pass proto tcp from any to any flags R/R
+pass proto tcp from any to any flags P/P
+pass proto tcp from any to any flags A/A
+pass proto tcp from any to any flags U/U
+pass proto tcp from any to any flags E/E
+pass proto tcp from any to any flags W/W
+pass proto tcp from any to any flags FSRPAUEW/FSRPAUEW
+pass proto tcp from any to any flags /FSRPAUEW
+pass proto tcp from any to any flags S/SAFR
+pass proto tcp from any to any flags /SA
+
+pass proto tcp from any to any flags S/
+pass proto tcp from any to any flags /
+pass proto tcp from any to any flags S/AFR
+pass proto tcp from any to any flags A/FSRPUEW
+pass proto tcp from any to any flags FSRPAUEW/FSRPAUE
diff --git a/regress/sbin/pfctl/pfail50.ok b/regress/sbin/pfctl/pfail50.ok
new file mode 100644
index 00000000000..887b242c7df
--- /dev/null
+++ b/regress/sbin/pfctl/pfail50.ok
@@ -0,0 +1,17 @@
+stdin:18: syntax error
+stdin:19: syntax error
+stdin:20: flags always false
+stdin:21: flags always false
+stdin:22: flags always false
+pass proto tcp all flags F/F
+pass proto tcp all flags S/S
+pass proto tcp all flags R/R
+pass proto tcp all flags P/P
+pass proto tcp all flags A/A
+pass proto tcp all flags U/U
+pass proto tcp all flags E/E
+pass proto tcp all flags W/W
+pass proto tcp all flags FSRPAUEW/FSRPAUEW
+pass proto tcp all flags /FSRPAUEW
+pass proto tcp all flags S/FSRA
+pass proto tcp all flags /SA