diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2011-07-08 21:57:49 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2011-07-08 21:57:49 +0000 |
commit | afd93088875b18c7019afcfb1e35baab6f96ca28 (patch) | |
tree | 06121794312d0027f181182f097b2fa28fd8f0bf | |
parent | e2f061bb51613352fe58d38bc1d2ede1f8a9dc10 (diff) |
Add regress tests for 'prio' keyword.
-rw-r--r-- | regress/sbin/pfctl/Makefile | 8 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf101.in | 8 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf101.loaded | 16 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf101.ok | 4 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfail51.in | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfail51.ok | 4 |
6 files changed, 42 insertions, 4 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index 1e59a409e56..75527f4219a 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.215 2011/07/07 01:58:12 mcbride Exp $ +# $OpenBSD: Makefile,v 1.216 2011/07/08 21:57:48 mcbride Exp $ # TARGETS # pf: feed pfNN.in through pfctl and check whether the output matches pfNN.ok @@ -16,14 +16,14 @@ PFTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 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+=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 90 91 92 93 94 95 96 -PFTESTS+=97 98 99 100 +PFTESTS+=97 98 99 100 101 PFFAIL=1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 19 20 23 25 27 -PFFAIL+=29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 52 53 +PFFAIL+=29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 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 23 24 25 26 27 28 29 PFLOAD+=30 31 32 34 36 38 39 40 44 46 47 48 49 54 56 60 61 65 66 67 68 69 70 71 -PFLOAD+=72 73 74 75 76 77 78 79 80 81 82 84 87 88 89 90 91 92 99 100 +PFLOAD+=72 73 74 75 76 77 78 79 80 81 82 84 87 88 89 90 91 92 99 100 101 PFALTQ=1 2 3 4 5 6 7 8 9 10 11 12 13 14 # disabled; no altq in anchors # PFLOAD+=33 35 37 42 43 45 51 58 59 62 63 64 diff --git a/regress/sbin/pfctl/pf101.in b/regress/sbin/pfctl/pf101.in new file mode 100644 index 00000000000..d9a9c0b3b2d --- /dev/null +++ b/regress/sbin/pfctl/pf101.in @@ -0,0 +1,8 @@ +# test prio + +pass prio 3 + +pass out on lo1000000 proto tcp from any to any port 22 prio (5 2) + +pass proto udp from any to { 127.0.0.1 127.0.0.2 } port 53 prio 4 + diff --git a/regress/sbin/pfctl/pf101.loaded b/regress/sbin/pfctl/pf101.loaded new file mode 100644 index 00000000000..67f7c9b86c9 --- /dev/null +++ b/regress/sbin/pfctl/pf101.loaded @@ -0,0 +1,16 @@ +@0 pass all flags S/SA prio 3 + [ Skip steps: d=end f=2 sa=end da=2 sp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@1 pass out on lo1000000 proto tcp from any to any port = ssh flags S/SA prio(5, 2) + [ Skip steps: d=end sa=end sp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@2 pass inet proto udp from any to 127.0.0.1 port = domain prio 4 + [ Skip steps: i=end r=end d=end f=end p=end sa=end sp=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@3 pass inet proto udp from any to 127.0.0.2 port = domain prio 4 + [ Skip steps: i=end r=end d=end f=end p=end sa=end da=end sp=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] diff --git a/regress/sbin/pfctl/pf101.ok b/regress/sbin/pfctl/pf101.ok new file mode 100644 index 00000000000..fcfdb6c9d80 --- /dev/null +++ b/regress/sbin/pfctl/pf101.ok @@ -0,0 +1,4 @@ +pass all flags S/SA prio 3 +pass out on lo1000000 proto tcp from any to any port = ssh flags S/SA prio(5, 2) +pass inet proto udp from any to 127.0.0.1 port = domain prio 4 +pass inet proto udp from any to 127.0.0.2 port = domain prio 4 diff --git a/regress/sbin/pfctl/pfail51.in b/regress/sbin/pfctl/pfail51.in new file mode 100644 index 00000000000..7b63efca61f --- /dev/null +++ b/regress/sbin/pfctl/pfail51.in @@ -0,0 +1,6 @@ +# test prio edge conditions + +pass on lo10000000 from any to any port 22 prio 8 +pass on lo10000000 from any to any port 22 prio -1 +pass on lo10000000 from any to any port 22 prio high +pass on lo10000000 from any to any port 22 prio diff --git a/regress/sbin/pfctl/pfail51.ok b/regress/sbin/pfctl/pfail51.ok new file mode 100644 index 00000000000..8dc0c7146d2 --- /dev/null +++ b/regress/sbin/pfctl/pfail51.ok @@ -0,0 +1,4 @@ +stdin:3: prio must be 0 - 7 +stdin:4: prio must be 0 - 7 +stdin:5: syntax error +stdin:6: syntax error |