summaryrefslogtreecommitdiff
path: root/regress/sbin/pfctl
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-03-11 15:26:45 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-03-11 15:26:45 +0000
commit67a920ad742b4f4b71351a51b5a0911be42fff27 (patch)
tree3a9734d029bc417ad5a2f85e79c9e5804cec20db /regress/sbin/pfctl
parente2e3c12c6a48b0ec3a0fa2850216935b1eb8adbd (diff)
check for rules getting qid and pqid set with cbq
Diffstat (limited to 'regress/sbin/pfctl')
-rw-r--r--regress/sbin/pfctl/Makefile4
-rw-r--r--regress/sbin/pfctl/pfaltq6.in12
-rw-r--r--regress/sbin/pfctl/pfaltq6.ok24
3 files changed, 38 insertions, 2 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 773dc084454..a489e3ed641 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.116 2003/03/11 15:07:19 henning Exp $
+# $OpenBSD: Makefile,v 1.117 2003/03/11 15:26:44 henning Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok
@@ -19,7 +19,7 @@ PFSIMPLE=1 2
PFSETUP=1 2 3
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
PFLOAD+=30 31 32 34 36 38 39 40 44 46 47 49 54 56
-PFALTQ=1 2 3 4 5
+PFALTQ=1 2 3 4 5 6
# disabled; no altq in anchors
# PFLOAD+=33 35 37 42 43 45 51 58 59
# disabled; no table def in anchors
diff --git a/regress/sbin/pfctl/pfaltq6.in b/regress/sbin/pfctl/pfaltq6.in
new file mode 100644
index 00000000000..dfab1585dc8
--- /dev/null
+++ b/regress/sbin/pfctl/pfaltq6.in
@@ -0,0 +1,12 @@
+# verify the queue IDs on the rules are set correctly
+
+altq on lo0 tbrsize 1824 cbq bandwidth 10Mb queue { wim, the minibar is empty }
+queue wim bandwidth 10% cbq(default)
+queue the bandwidth 10%
+queue minibar bandwidth 80% priority 7
+queue is bandwidth 10%
+queue empty bandwidth 90%
+pass in on lo0 proto tcp to port 22 keep state queue(the minibar)
+pass in proto tcp to port 22 keep state queue(is empty)
+pass in proto tcp to port 22 keep state queue the
+pass in proto tcp to port 25 keep state queue wim
diff --git a/regress/sbin/pfctl/pfaltq6.ok b/regress/sbin/pfctl/pfaltq6.ok
new file mode 100644
index 00000000000..66cc35a7f3e
--- /dev/null
+++ b/regress/sbin/pfctl/pfaltq6.ok
@@ -0,0 +1,24 @@
+queue root_lo0 bandwidth 10Mb priority 0 cbq( wrr root ) {wim, the, minibar, is, empty}
+[ qid=4294967294 ifname=lo0 ifbandwidth=10Mb ]
+queue wim bandwidth 1Mb cbq( default )
+[ qid=4294967293 ifname=lo0 ifbandwidth=10Mb ]
+queue the bandwidth 1Mb
+[ qid=1 ifname=lo0 ifbandwidth=10Mb ]
+queue minibar bandwidth 8Mb priority 7
+[ qid=2 ifname=lo0 ifbandwidth=10Mb ]
+queue is bandwidth 1Mb
+[ qid=3 ifname=lo0 ifbandwidth=10Mb ]
+queue empty bandwidth 9Mb
+[ qid=4 ifname=lo0 ifbandwidth=10Mb ]
+@0 pass in on lo0 proto tcp from any to any port = ssh keep state queue(the, minibar)
+[ Skip steps: d=end f=end p=end sa=end sp=end da=end dp=3 ]
+[ queue: qname=the qid=1 pqname=minibar pqid=2 ]
+@1 pass in proto tcp from any to any port = ssh keep state queue(is, empty)
+[ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=3 ]
+[ queue: qname=is qid=3 pqname=empty pqid=4 ]
+@2 pass in proto tcp from any to any port = ssh keep state queue the
+[ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end ]
+[ queue: qname=the qid=1 pqname= pqid=1 ]
+@3 pass in proto tcp from any to any port = smtp keep state queue wim
+[ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=end ]
+[ queue: qname=wim qid=4294967293 pqname= pqid=4294967293 ]