summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-11-27 19:00:22 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-11-27 19:00:22 +0000
commitd0aebf0e1750a901484e966ca4a9f3d76d1e04cb (patch)
tree2fc1d7f023bb7ae0a68b07d0e6650571cd907fa6
parent849d57038a6cc090790309a164887d0b15cc7bf8 (diff)
more altq testing
-rw-r--r--regress/sbin/pfctl/Makefile4
-rw-r--r--regress/sbin/pfctl/pf35.in30
-rw-r--r--regress/sbin/pfctl/pf35.ok18
3 files changed, 50 insertions, 2 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 22f78edb997..99c9771e74f 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.43 2002/11/25 18:27:51 mickey Exp $
+# $OpenBSD: Makefile,v 1.44 2002/11/27 19:00:21 henning Exp $
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
+PFTESTS+=28 29 30 31 32 33 34 35
PFFAIL=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
PFSIMPLE=1 2
PFSETUP=1
diff --git a/regress/sbin/pfctl/pf35.in b/regress/sbin/pfctl/pf35.in
new file mode 100644
index 00000000000..a85b2573ab8
--- /dev/null
+++ b/regress/sbin/pfctl/pf35.in
@@ -0,0 +1,30 @@
+#test matching on tos; test queue rules which specify qlimit, test altq rule
+#with tbrsize specification, test queue rules which do not specify bandwidth,
+#test queue rule which doesn't specify anything
+
+intf = "lo0"
+developerhosts="10.0.0.0/24"
+employeehosts="10.0.1.0/24"
+
+altq on $intf scheduler cbq(ecn) bandwidth 10Mb tbrsize 5000 \
+ queue { std, http, mail, ssh }
+
+queue std bandwidth 10% qlimit 1 cbq(default)
+queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
+queue developers
+queue employees bandwidth 10%
+queue mail bandwidth 10% priority 0 cbq(borrow ecn)
+queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
+queue ssh_interactive priority 7
+queue ssh_bulk priority 0 qlimit 60
+
+block return out on $intf inet all queue std
+pass out on $intf inet proto tcp from $developerhosts to any port 80 keep state \
+ queue developers
+pass out on $intf inet proto tcp from $employeehosts to any port 80 keep state \
+ queue employees
+pass out on $intf inet proto tcp from any to any port 22 tos 0x10 \
+ keep state queue ssh_interactive #priority for interactive sessions
+pass out on $intf inet proto tcp from any to any port 22 tos 0x08 \
+ keep state queue ssh_bulk #less priority for scp/sftp/...
+pass out on $intf inet proto tcp from any to any port 25 keep state queue mail
diff --git a/regress/sbin/pfctl/pf35.ok b/regress/sbin/pfctl/pf35.ok
new file mode 100644
index 00000000000..f1cc4e6cc45
--- /dev/null
+++ b/regress/sbin/pfctl/pf35.ok
@@ -0,0 +1,18 @@
+intf = lo0
+developerhosts = 10.0.0.0/24
+employeehosts = 10.0.1.0/24
+altq on lo0 scheduler cbq( red ecn ) bandwidth 10.00Mb tbrsize 5000 queue { std http mail ssh }
+queue std bandwidth 1000.00Kb qlimit 1 cbq( default )
+queue http bandwidth 6.00Mb priority 2 cbq( red borrow ) { employees developers }
+queue developers bandwidth 6.00Mb
+queue employees bandwidth 600.00Kb
+queue mail bandwidth 1000.00Kb priority 0 cbq( red ecn borrow )
+queue ssh bandwidth 2.00Mb cbq( borrow ) { ssh_interactive ssh_bulk }
+queue ssh_interactive bandwidth 2.00Mb priority 7
+queue ssh_bulk bandwidth 2.00Mb priority 0 qlimit 60
+@0 block return out on lo0 inet all queue std
+@1 pass out on lo0 inet proto tcp from 10.0.0.0/24 to any port = www keep state queue developers
+@2 pass out on lo0 inet proto tcp from 10.0.1.0/24 to any port = www keep state queue employees
+@3 pass out on lo0 inet proto tcp from any to any port = ssh tos 0x10 keep state queue ssh_interactive
+@4 pass out on lo0 inet proto tcp from any to any port = ssh tos 0x08 keep state queue ssh_bulk
+@5 pass out on lo0 inet proto tcp from any to any port = smtp keep state queue mail