-# $OpenBSD: Makefile,v 1.218 2011/07/27 10:40:05 mcbride Exp $
+# $OpenBSD: Makefile,v 1.219 2014/04/18 10:48:23 henning Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check whether the output matches pfNN.ok
# pfcmd: test pfctl command line parsing
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+=28 29 30 31 32 34 35 36 38 39 40 41 44 46 47 48 49 50
+PFTESTS+=52 53 54 55 56 57 60 61 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 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 51 52 53
+PFFAIL=1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 19 20 23 25 27
+PFFAIL+=30 37 38 39 40 41 42 43 47 48 49 50 51 52 53
PFSIMPLE=1 2
-PFSETUP=1 2 3 4
+PFSETUP=1 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 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
-# 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 14 15
-PFOPT=1 2 3 6
+PFOPT=1 2 6
PFIF2IP=1 2 3
PFCHKSUM=1 2 3
PFCMD=1
NODEFAULT_TARGETS+=pfsetup
REGRESS_ROOT_TARGETS+=pfsetup
-.for n in ${PFALTQ}
-PFALTQ_TARGETS+=pfaltq${n}
-PFALTQ_UPDATES+=pfaltq${n}-update
-
-pfaltq${n}:
- ${SUDO} pfctl -o none -Fa >/dev/null 2>&1
- ${SUDO} pfctl -o none -f - < ${.CURDIR}/pfaltq${n}.in
- ( ${SUDO} pfctl -o none -gsq; \
- ${SUDO} pfctl -o none -gsr ) | \
- diff -u ${.CURDIR}/pfaltq${n}.ok /dev/stdin
- ${SUDO} pfctl -o none -Fa >/dev/null 2>&1
-
-pfaltq${n}-update:
- ${SUDO} pfctl -o none -Fa >/dev/null 2>&1
- ${SUDO} pfctl -o none -f - < ${.CURDIR}/pfaltq${n}.in
- ( ${SUDO} pfctl -o none -gsq; \
- ${SUDO} pfctl -o none -gsr ) > ${.CURDIR}/pfaltq${n}.ok
- ${SUDO} pfctl -o none -Fa >/dev/null 2>&1
-
-.endfor
-
-pfaltq: ${PFALTQ_TARGETS}
-pfaltq-update: ${PFALTQ_UPDATES}
-
-NODEFAULT_TARGETS+=pfaltq
-REGRESS_ROOT_TARGETS+=pfaltq
-
.for n in ${PFCHKSUM}
PFCHKSUM_TARGETS+=pfchksum${n}
PFCHKSUM_UPDATES+=pfchksum${n}-update
+++ /dev/null
-ext_if = "lo0"
-
-altq on $ext_if cbq bandwidth 10Mb tbrsize 1824 \
- queue { deflt, http, ssh, mail, rsets }
-oldqueue deflt bandwidth 10% priority 0 cbq(default ecn)
-oldqueue http bandwidth 1.5Mb priority 3 { http_vhosts, http_cust1 }
-oldqueue http_vhosts bandwidth 40% cbq(borrow red)
-oldqueue http_cust1 bandwidth 0.5Mb
-oldqueue mail bandwidth 10% priority 1
-oldqueue ssh bandwidth 200Kb priority 7 cbq(borrow)
-oldqueue rsets bandwidth 150000b priority 0 cbq(red)
-
-block return in on $ext_if inet all queue rsets
-pass in on $ext_if inet proto tcp from any to any port 80 keep state queue http
-pass out on $ext_if inet proto tcp from any to any port 22 keep state queue ssh
-pass in on $ext_if inet proto tcp from any to any port 22 keep state queue ssh
-pass out on $ext_if inet proto tcp from any to any port 25 keep state queue mail
-pass out on $ext_if inet all
+++ /dev/null
-@0 block return in on lo0 inet all queue rsets
-[ Skip steps: i=end d=2 f=end sa=end sp=end da=end ]
-[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ]
-
-@1 pass in on lo0 inet proto tcp from any to any port = 80 keep state queue http
-[ Skip steps: i=end f=end p=5 sa=end sp=end da=end ]
-[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ]
-
-@2 pass out on lo0 inet proto tcp from any to any port = 22 keep state queue ssh
-[ Skip steps: i=end f=end p=5 sa=end sp=end da=end dp=4 ]
-[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ]
-
-@3 pass in on lo0 inet proto tcp from any to any port = 22 keep state queue ssh
-[ Skip steps: i=end f=end p=5 sa=end sp=end da=end ]
-[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ]
-
-@4 pass out on lo0 inet proto tcp from any to any port = 25 keep state queue mail
-[ Skip steps: i=end d=end f=end sa=end sp=end da=end ]
-[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ]
-
-@5 pass out on lo0 inet all keep state
-[ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=end ]
-[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ]
-
+++ /dev/null
-ext_if = "lo0"
-altq on lo0 cbq bandwidth 10Mb tbrsize 1824 queue { deflt http ssh mail rsets }
-oldqueue deflt bandwidth 10% priority 0 cbq( red ecn default )
-oldqueue http bandwidth 1.50Mb priority 3 { http_vhosts http_cust1 }
-oldqueue http_vhosts bandwidth 40% cbq( red borrow )
-oldqueue http_cust1 bandwidth 500Kb
-oldqueue mail bandwidth 10%
-oldqueue ssh bandwidth 200Kb priority 7 cbq( borrow )
-oldqueue rsets bandwidth 150Kb priority 0 cbq( red )
-block return in on lo0 inet all set ( queue rsets )
-pass in on lo0 inet proto tcp from any to any port = 80 flags S/SA set ( queue http )
-pass out on lo0 inet proto tcp from any to any port = 22 flags S/SA set ( queue ssh )
-pass in on lo0 inet proto tcp from any to any port = 22 flags S/SA set ( queue ssh )
-pass out on lo0 inet proto tcp from any to any port = 25 flags S/SA set ( queue mail )
-pass out on lo0 inet all flags S/SA
-#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
-#test altq rule with qlimit spec
+#test matching on tos
intf = "lo0"
-developerhosts="10.0.0.0/24"
-employeehosts="10.0.1.0/24"
-
-altq on $intf cbq(ecn) bandwidth 10Mb qlimit 100 tbrsize 5000 \
- queue { std, http, mail, ssh }
-
-oldqueue std bandwidth 10% qlimit 1 cbq(default)
-oldqueue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
-oldqueue developers bandwidth 60%
-oldqueue employees bandwidth 40%
-oldqueue mail bandwidth 10% priority 0 cbq(borrow ecn)
-oldqueue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
-oldqueue ssh_interactive priority 7 bandwidth 30%
-oldqueue ssh_bulk priority 0 qlimit 60 bandwidth 70%
-
-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
+pass out on $intf inet proto tcp from any to any port 22 tos 0x10
+pass out on $intf inet proto tcp from any to any port 22 tos 0x08
intf = "lo0"
-developerhosts = "10.0.0.0/24"
-employeehosts = "10.0.1.0/24"
-altq on lo0 cbq( red ecn ) bandwidth 10Mb qlimit 100 tbrsize 5000 queue { std http mail ssh }
-oldqueue std bandwidth 10% qlimit 1 cbq( default )
-oldqueue http bandwidth 60% priority 2 cbq( red borrow ) { employees developers }
-oldqueue developers bandwidth 60%
-oldqueue employees bandwidth 40%
-oldqueue mail bandwidth 10% priority 0 cbq( red ecn borrow )
-oldqueue ssh bandwidth 20% cbq( borrow ) { ssh_interactive ssh_bulk }
-oldqueue ssh_interactive bandwidth 30% priority 7
-oldqueue ssh_bulk bandwidth 70% priority 0 qlimit 60
-block return out on lo0 inet all set ( queue std )
-pass out on lo0 inet proto tcp from 10.0.0.0/24 to any port = 80 flags S/SA set ( queue developers )
-pass out on lo0 inet proto tcp from 10.0.1.0/24 to any port = 80 flags S/SA set ( queue employees )
-pass out on lo0 inet proto tcp from any to any port = 22 flags S/SA tos 0x10 set ( queue ssh_interactive )
-pass out on lo0 inet proto tcp from any to any port = 22 flags S/SA tos 0x08 set ( queue ssh_bulk )
-pass out on lo0 inet proto tcp from any to any port = 25 flags S/SA set ( queue mail )
+pass out on lo0 inet proto tcp from any to any port = 22 flags S/SA tos 0x10
+pass out on lo0 inet proto tcp from any to any port = 22 flags S/SA tos 0x08
+++ /dev/null
-#test altq with interface expansion
-#also tests multiple queues with the same name but on different interfaces
-
-altq on { lo0 lo1000000 } tbrsize 1824 cbq bandwidth 10Mb queue std
-oldqueue std cbq(default)
+++ /dev/null
-altq on lo0 cbq bandwidth 10Mb tbrsize 1824 queue { std }
-altq on lo1000000 cbq bandwidth 10Mb tbrsize 1824 queue { std }
-oldqueue std cbq( default )
+++ /dev/null
-# shuffle opts a bit around to test flexopts
-
-ext_if = "lo0"
-
-altq on $ext_if bandwidth 10Mb tbrsize 1824 cbq \
- queue { deflt, http, ssh, mail, rsets }
-oldqueue deflt cbq(default ecn) bandwidth 10% priority 0
-oldqueue http priority 3 bandwidth 1.5Mb { http_vhosts, http_cust1 }
-oldqueue http_vhosts cbq(borrow red) bandwidth 40%
+++ /dev/null
-ext_if = "lo0"
-altq on lo0 cbq bandwidth 10Mb tbrsize 1824 queue { deflt http ssh mail rsets }
-oldqueue deflt bandwidth 10% priority 0 cbq( red ecn default )
-oldqueue http bandwidth 1.50Mb priority 3 { http_vhosts http_cust1 }
-oldqueue http_vhosts bandwidth 40% cbq( red borrow )
+++ /dev/null
-altq on lo0 priq bandwidth 10Mb tbrsize 1824 queue { pri-low pri-med pri-high }
-oldqueue pri-low priority 0
-oldqueue pri-med priority 1 priq(default)
-oldqueue pri-high priority 2
+++ /dev/null
-altq on lo0 priq bandwidth 10Mb tbrsize 1824 queue { pri-low pri-med pri-high }
-oldqueue pri-low priority 0
-oldqueue pri-med priq( default )
-oldqueue pri-high priority 2
+++ /dev/null
-# queue on two interfaces
-
-altq on tun1000000 bandwidth 100Kb cbq queue { std ssh }
-altq on tun1000001 bandwidth 10Mb cbq queue { blah ssh }
-oldqueue std bandwidth 20% cbq(borrow, default)
-oldqueue ssh bandwidth 30% cbq(borrow) { ssh2 }
-oldqueue ssh2 bandwidth 80%
-oldqueue blah bandwidth 60% cbq(default)
+++ /dev/null
-altq on tun1000000 cbq bandwidth 100Kb tbrsize 1500 queue { std ssh }
-altq on tun1000001 cbq bandwidth 10Mb tbrsize 6000 queue { blah ssh }
-oldqueue std bandwidth 20% cbq( borrow default )
-oldqueue ssh bandwidth 30% cbq( borrow ) { ssh2 }
-oldqueue ssh2 bandwidth 80%
-oldqueue blah bandwidth 60% cbq( default )
+++ /dev/null
-#tests an edge case in LOOP_THROUGH behaviour, the one loop despite the
-#list is empty
-altq on { lo0 tun1000000 } priq bandwidth 10Mb tbrsize 1824 queue q_def
-oldqueue q_def priq(default)
+++ /dev/null
-altq on lo0 priq bandwidth 10Mb tbrsize 1824 queue { q_def }
-altq on tun1000000 priq bandwidth 10Mb tbrsize 1824 queue { q_def }
-oldqueue q_def priq( default )
+++ /dev/null
-# more complicated case to provoke queue id assignment errors:
-# -two same named queues must have same qid on all interfaces
-# -two differently named queues must not share a qid, even on different ifs
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins zwei drei }
-oldqueue eins bandwidth 10% hfsc(default)
-oldqueue zwei bandwidth 60% { sub2 sub3 }
-oldqueue sub2 bandwidth 20%
-oldqueue sub3 bandwidth 20%
-oldqueue drei bandwidth 10%
-
-
+++ /dev/null
-altq on lo0 hfsc bandwidth 10Mb tbrsize 1824 queue { eins zwei drei }
-oldqueue eins bandwidth 10% hfsc( default )
-oldqueue zwei bandwidth 60% { sub2 sub3 }
-oldqueue sub2 bandwidth 20%
-oldqueue sub3 bandwidth 20%
-oldqueue drei bandwidth 10%
+++ /dev/null
-# service curve parse/print functions feedback test
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins zwei drei }
-oldqueue eins bandwidth 10% hfsc(default linkshare(20% 20 5%) realtime 500Kb)
-oldqueue zwei bandwidth 40% hfsc(linkshare(35% 10 25%) upperlimit 5Mb)
-oldqueue drei bandwidth 50% hfsc(linkshare(45% 20 4Mb) \
- upperlimit(65% 10 45%))
-
-
+++ /dev/null
-altq on lo0 hfsc bandwidth 10Mb tbrsize 1824 queue { eins zwei drei }
-oldqueue eins bandwidth 10% hfsc( default realtime 500Kb linkshare(20% 20 5%) )
-oldqueue zwei bandwidth 40% hfsc( linkshare(35% 10 25%) upperlimit 5Mb )
-oldqueue drei bandwidth 50% hfsc( linkshare(45% 20 4Mb) upperlimit(65% 10 45%) )
+++ /dev/null
-# service curve parse/print functions feedback test
-# try to provoke them
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins zwei drei }
-altq on tun1000000 tbrsize 1824 bandwidth 100Mb hfsc queue { eins zwei drei }
-oldqueue eins bandwidth 10% hfsc(default linkshare(20% 20 5%) realtime 500Kb)
-oldqueue zwei bandwidth 40% hfsc(linkshare(35% 10 25%) upperlimit 5Mb)
-oldqueue drei bandwidth 50% hfsc(linkshare(45% 20 4Mb) \
- upperlimit(65% 10 45%))
-
-
+++ /dev/null
-altq on lo0 hfsc bandwidth 10Mb tbrsize 1824 queue { eins zwei drei }
-altq on tun1000000 hfsc bandwidth 100Mb tbrsize 1824 queue { eins zwei drei }
-oldqueue eins bandwidth 10% hfsc( default realtime 500Kb linkshare(20% 20 5%) )
-oldqueue zwei bandwidth 40% hfsc( linkshare(35% 10 25%) upperlimit 5Mb )
-oldqueue drei bandwidth 50% hfsc( linkshare(45% 20 4Mb) upperlimit(65% 10 45%) )
+++ /dev/null
-# queue without parent
-
-altq on lo0 cbq tbrsize 1824 bandwidth 10Mb queue { frenchs eat frogs }
-oldqueue frenchs bandwidth 30% cbq(default)
-oldqueue eat bandwidth 30%
-oldqueue toads bandwidth 30%
+++ /dev/null
-stdin:6: queue toads has no parent
-stdin:6: errors in queue definition
-altq on lo0 cbq bandwidth 10Mb tbrsize 1824 queue { frenchs eat frogs }
-oldqueue frenchs bandwidth 30% cbq( default )
-oldqueue eat bandwidth 30%
+++ /dev/null
-# altq spec without child queues, altq without scheduler spec
-
-altq on lo0 bandwidth 10Mb queue { nonexistent }
+++ /dev/null
-stdin:3: no scheduler specified!
+++ /dev/null
-#test an edge case: LOOP_THROUGH modifies the list
-
-lan_if = lo0
-ext_if = nothere0
-
-altq on $ext_if bandwidth 512Kb tbrsize 33224 cbq queue { q_ext_std }
-oldqueue q_ext_std bandwidth 100% cbq(default) { q_ext_p2p }
-oldqueue q_ext_p2p bandwidth 25% cbq(red ecn)
-
-altq on $lan_if bandwidth 512Kb tbrsize 33224 cbq queue { q_lan_std }
-oldqueue q_lan_std bandwidth 100% cbq(default) { q_lan_p2p }
-oldqueue q_lan_p2p bandwidth 25% cbq(red ecn)
+++ /dev/null
-stdin:6: unknown interface nothere0
-stdin:7: queue q_ext_std has no parent
-stdin:7: errors in queue definition
-stdin:8: queue q_ext_p2p has no parent
-stdin:8: errors in queue definition
-lan_if = "lo0"
-ext_if = "nothere0"
-altq on lo0 cbq bandwidth 512Kb tbrsize 33224 queue { q_lan_std }
-oldqueue q_lan_std cbq( default ) { q_lan_p2p }
-oldqueue q_lan_p2p bandwidth 25% cbq( red ecn )
+++ /dev/null
-# queue doubly defined on one interface
-altq on gif3 cbq bandwidth 100Kb queue { eins, zwei }
-oldqueue eins cbq (default) { zwei }
-oldqueue zwei
+++ /dev/null
-pfctl: the sum of the child bandwidth higher than parent "root_gif3"
-queue zwei already exists on interface gif3
-stdin:4: errors in queue definition
-altq on gif3 cbq bandwidth 100Kb tbrsize 1500 queue { eins zwei }
-oldqueue eins cbq( default ) { zwei }
-oldqueue zwei
+++ /dev/null
-#invalid cbq flags
-
-altq on gif2 cbq(borrow invalid) bandwidth 10Mb queue one
+++ /dev/null
-stdin:3: unknown cbq flag "invalid"
+++ /dev/null
-#invalid cbq/priq flags
-
-altq on gif2 priq(red invalid) bandwidth 10Mb queue one
+++ /dev/null
-stdin:3: unknown priq flag "invalid"
+++ /dev/null
-# double linkshare spec
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins }
-oldqueue eins bandwidth 10% hfsc(default linkshare(20% 20 5%) linkshare 1Mb)
-
-
+++ /dev/null
-stdin:4: linkshare already specified
-altq on lo0 hfsc bandwidth 10Mb tbrsize 1824 queue { eins }
+++ /dev/null
-# double upperlimit
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins }
-oldqueue eins bandwidth 10% hfsc(default upperlimit(20% 20 5%) upperlimit 1Mb)
-
-
+++ /dev/null
-stdin:4: upperlimit already specified
-altq on lo0 hfsc bandwidth 10Mb tbrsize 1824 queue { eins }
+++ /dev/null
-# invalid CBQ priority
-
-ext_if = lo0
-
-altq on $ext_if bandwidth 512Kb tbrsize 33224 cbq queue { q_ext_std }
-oldqueue q_ext_std priority 9 cbq(default)
-
-pass in all
+++ /dev/null
-pfctl: priority out of range: max 7
-stdin:6: errors in queue definition
-ext_if = "lo0"
-altq on lo0 cbq bandwidth 512Kb tbrsize 33224 queue { q_ext_std }
-oldqueue root_lo0 priority 0 cbq( wrr root )
+++ /dev/null
-# invalid PRIQ priority
-
-ext_if = lo0
-
-altq on $ext_if bandwidth 512Kb tbrsize 33224 priq queue { q_ext_std }
-oldqueue q_ext_std priority 16 priq(default)
+++ /dev/null
-pfctl: priority out of range: max 15
-stdin:6: errors in queue definition
-ext_if = "lo0"
-altq on lo0 priq bandwidth 512Kb tbrsize 33224 queue { q_ext_std }
-oldqueue priority 0
+++ /dev/null
-# self as child
-# how one can be stupid enough to specify this in the first place is beyond me
-
-altq on lo0 bandwidth 512Kb tbrsize 33224 cbq queue { i_am_braindead }
-oldqueue i_am_braindead cbq(default) { i_am_braindead }
+++ /dev/null
-stdin:5: queue cannot have itself as child
-stdin:5: errors in queue definition
-altq on lo0 cbq bandwidth 512Kb tbrsize 33224 queue { i_am_braindead }
-oldqueue i_am_braindead cbq( default ) { i_am_braindead }
-# queuenames cannot be numbers
-altq on lo0 tbrsize 1824 bandwidth 10Mb priq queue 80
-oldqueue 80 priority 2 priq(default)
-
# tablenames cannot be numbers
table <444> { 1.2.3.4 }
pass in on lo1000000 proto tcp to 10.0.0.1 port 80 flags S/SA modulate state \
-stdin:2: syntax error
-stdin:15: syntax error
-stdin:16: syntax error
-stdin:17: syntax error
+stdin:11: syntax error
+stdin:12: syntax error
+stdin:13: syntax error
table <444> { 1.2.3.4 }
+++ /dev/null
-#queue id assignment with priq
-
-altq on { lo0 tun1000000 } tbrsize 1824 priq bandwidth 10Mb queue { one two }
-oldqueue one priority 1 priq(default)
-oldqueue two priority 15
+++ /dev/null
-oldqueue one on lo0 priq( default )
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue one on tun1000000 priq( default )
- [ qid=1 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue two on lo0 priority 15
- [ qid=2 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue two on tun1000000 priority 15
- [ qid=2 ifname=tun1000000 ifbandwidth=10Mb ]
+++ /dev/null
-#queue id assignment with hfsc: two same named queues on different interfaces
-#must have the same qid
-
-altq on { lo0 tun1000000 } tbrsize 1824 hfsc bandwidth 10Mb queue { one two }
-oldqueue one bandwidth 10% hfsc(default)
-oldqueue two bandwidth 90% { three four}
-oldqueue three bandwidth 50%
-oldqueue four bandwidth 40%
-
+++ /dev/null
-oldqueue root_lo0 on lo0 bandwidth 10Mb priority 0 {one, two}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue one on lo0 bandwidth 1Mb hfsc( default )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue two on lo0 bandwidth 9Mb {three, four}
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue three on lo0 bandwidth 4.50Mb
- [ qid=5 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue four on lo0 bandwidth 3.60Mb
- [ qid=6 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue root_tun1000000 on tun1000000 bandwidth 10Mb priority 0 {one, two}
- [ qid=2 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue one on tun1000000 bandwidth 1Mb hfsc( default )
- [ qid=3 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue two on tun1000000 bandwidth 9Mb {three, four}
- [ qid=4 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue three on tun1000000 bandwidth 4.50Mb
- [ qid=5 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue four on tun1000000 bandwidth 3.60Mb
- [ qid=6 ifname=tun1000000 ifbandwidth=10Mb ]
+++ /dev/null
-# more complicated case to provoke queue id assignment errors:
-# -two same named queues must have same qid on all interfaces
-# -two differently named queues must not share a qid, even on different ifs
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins zwei drei }
-altq on tun1000000 tbrsize 1824 bandwidth 33600b hfsc queue { vier zwei fuenf }
-oldqueue eins bandwidth 10% hfsc(default)
-oldqueue zwei bandwidth 80% { sub2 sub3 }
-oldqueue sub2 bandwidth 50%
-oldqueue sub3 bandwidth 50%
-oldqueue drei bandwidth 10% subseven
-oldqueue vier bandwidth 10% hfsc(default)
-oldqueue fuenf bandwidth 5% subseven
-oldqueue subseven bandwidth 90%
-
+++ /dev/null
-oldqueue root_lo0 on lo0 bandwidth 10Mb priority 0 {eins, zwei, drei}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue eins on lo0 bandwidth 1Mb hfsc( default )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue zwei on lo0 bandwidth 8Mb {sub2, sub3}
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue sub2 on lo0 bandwidth 4Mb
- [ qid=5 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue sub3 on lo0 bandwidth 4Mb
- [ qid=6 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue drei on lo0 bandwidth 1Mb {subseven}
- [ qid=7 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue subseven on lo0 bandwidth 900Kb
- [ qid=10 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue root_tun1000000 on tun1000000 bandwidth 33.60Kb priority 0 {zwei, vier, fuenf}
- [ qid=2 ifname=tun1000000 ifbandwidth=33.60Kb ]
-oldqueue zwei on tun1000000 bandwidth 26.88Kb {sub2, sub3}
- [ qid=4 ifname=tun1000000 ifbandwidth=33.60Kb ]
-oldqueue sub2 on tun1000000 bandwidth 13.40Kb
- [ qid=5 ifname=tun1000000 ifbandwidth=33.60Kb ]
-oldqueue sub3 on tun1000000 bandwidth 13.40Kb
- [ qid=6 ifname=tun1000000 ifbandwidth=33.60Kb ]
-oldqueue vier on tun1000000 bandwidth 3.36Kb hfsc( default )
- [ qid=8 ifname=tun1000000 ifbandwidth=33.60Kb ]
-oldqueue fuenf on tun1000000 bandwidth 1.68Kb {subseven}
- [ qid=9 ifname=tun1000000 ifbandwidth=33.60Kb ]
-oldqueue subseven on tun1000000 bandwidth 1.44Kb
- [ qid=10 ifname=tun1000000 ifbandwidth=33.60Kb ]
+++ /dev/null
-# linkshare & upperlimit service curves
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins zwei drei }
-queue eins bandwidth 10% hfsc(default linkshare(20% 20 5%))
-queue zwei bandwidth 40% hfsc(linkshare 35% upperlimit 5Mb)
-queue drei bandwidth 50% hfsc(linkshare(45% 20 40%) \
- upperlimit(65% 10 45%))
-
-
+++ /dev/null
-queue root_lo0 on lo0 bandwidth 10Mb priority 0 {eins, zwei, drei}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-queue eins on lo0 bandwidth 1Mb hfsc( default linkshare(2Mb 20 500Kb) )
- [ qid=2 ifname=lo0 ifbandwidth=10Mb ]
-queue zwei on lo0 bandwidth 4Mb hfsc( linkshare 3.50Mb upperlimit 5Mb )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-queue drei on lo0 bandwidth 5Mb hfsc( linkshare(4.50Mb 20 4Mb) upperlimit(6.50Mb 10 4.50Mb) )
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
+++ /dev/null
-# realtime service curve
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue { eins zwei drei }
-queue eins bandwidth 10% hfsc(default realtime(20% 20 5%))
-queue zwei bandwidth 40% hfsc(linkshare 35% realtime 0.5Mb)
-queue drei bandwidth 50% hfsc(realtime(55% 20 40%) \
- upperlimit(65% 10 45%))
-
-
+++ /dev/null
-queue root_lo0 on lo0 bandwidth 10Mb priority 0 {eins, zwei, drei}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-queue eins on lo0 bandwidth 1Mb hfsc( default realtime(2Mb 20 500Kb) )
- [ qid=2 ifname=lo0 ifbandwidth=10Mb ]
-queue zwei on lo0 bandwidth 4Mb hfsc( realtime 500Kb linkshare 3.50Mb )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-queue drei on lo0 bandwidth 5Mb hfsc( realtime(5.50Mb 20 4Mb) upperlimit(6.50Mb 10 4.50Mb) )
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
+++ /dev/null
-# try to provoke the print function for linkshare to omit printing the likshare
-# service curve because m2 = bandwidth, the default
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb hfsc queue eins
-queue eins bandwidth 10% hfsc(default linkshare(15% 20 10%))
-
-
+++ /dev/null
-queue root_lo0 on lo0 bandwidth 10Mb priority 0 {eins}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-queue eins on lo0 bandwidth 1Mb hfsc( default linkshare(1.50Mb 20 1Mb) )
- [ qid=2 ifname=lo0 ifbandwidth=10Mb ]
+++ /dev/null
-#queue id assignment with cbq: two same named queues on different interfaces
-#must have the same qid
-
-altq on { lo0 tun1000000 } tbrsize 1824 cbq bandwidth 10Mb queue { one two }
-oldqueue one bandwidth 10% cbq(default)
-oldqueue two bandwidth 90% { three four}
-oldqueue three bandwidth 50%
-oldqueue four bandwidth 40%
-
+++ /dev/null
-oldqueue root_lo0 on lo0 bandwidth 10Mb priority 0 cbq( wrr root ) {one, two}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue one on lo0 bandwidth 1Mb cbq( default )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue two on lo0 bandwidth 9Mb {three, four}
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue three on lo0 bandwidth 4.50Mb
- [ qid=5 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue four on lo0 bandwidth 3.60Mb
- [ qid=6 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue root_tun1000000 on tun1000000 bandwidth 10Mb priority 0 cbq( wrr root ) {one, two}
- [ qid=2 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue one on tun1000000 bandwidth 1Mb cbq( default )
- [ qid=3 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue two on tun1000000 bandwidth 9Mb {three, four}
- [ qid=4 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue three on tun1000000 bandwidth 4.50Mb
- [ qid=5 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue four on tun1000000 bandwidth 3.60Mb
- [ qid=6 ifname=tun1000000 ifbandwidth=10Mb ]
+++ /dev/null
-# more complicated case to provoke queue id assignment errors:
-# -two same named queues must have same qid on all interfaces
-# -two differently named queues must not share a qid, even on different ifs
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb cbq queue { eins zwei drei }
-altq on tun1000000 tbrsize 1824 bandwidth 128000b cbq queue { vier zwei fuenf }
-oldqueue eins bandwidth 10% cbq(default)
-oldqueue zwei bandwidth 60% { sub2 sub3 }
-oldqueue sub2 bandwidth 50%
-oldqueue sub3 bandwidth 50%
-oldqueue drei bandwidth 30% subseven
-oldqueue vier bandwidth 25% cbq(default)
-oldqueue fuenf bandwidth 15% subseven
-oldqueue subseven bandwidth 90%
-
+++ /dev/null
-oldqueue root_lo0 on lo0 bandwidth 10Mb priority 0 cbq( wrr root ) {eins, zwei, drei}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue eins on lo0 bandwidth 1Mb cbq( default )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue zwei on lo0 bandwidth 6Mb {sub2, sub3}
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue sub2 on lo0 bandwidth 3Mb
- [ qid=5 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue sub3 on lo0 bandwidth 3Mb
- [ qid=6 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue drei on lo0 bandwidth 3Mb {subseven}
- [ qid=7 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue subseven on lo0 bandwidth 2.70Mb
- [ qid=10 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue root_tun1000000 on tun1000000 bandwidth 128Kb priority 0 cbq( wrr root ) {zwei, vier, fuenf}
- [ qid=2 ifname=tun1000000 ifbandwidth=128Kb ]
-oldqueue zwei on tun1000000 bandwidth 76.80Kb {sub2, sub3}
- [ qid=4 ifname=tun1000000 ifbandwidth=128Kb ]
-oldqueue sub2 on tun1000000 bandwidth 38.40Kb
- [ qid=5 ifname=tun1000000 ifbandwidth=128Kb ]
-oldqueue sub3 on tun1000000 bandwidth 38.40Kb
- [ qid=6 ifname=tun1000000 ifbandwidth=128Kb ]
-oldqueue vier on tun1000000 bandwidth 32Kb cbq( default )
- [ qid=8 ifname=tun1000000 ifbandwidth=128Kb ]
-oldqueue fuenf on tun1000000 bandwidth 19.20Kb {subseven}
- [ qid=9 ifname=tun1000000 ifbandwidth=128Kb ]
-oldqueue subseven on tun1000000 bandwidth 17.28Kb
- [ qid=10 ifname=tun1000000 ifbandwidth=128Kb ]
+++ /dev/null
-# test two different named queues don't get the same qid on different interfaces
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb cbq queue { bloody germans }
-altq on tun1000000 tbrsize 1824 bandwidth 10Mb cbq queue { bloody toads }
-oldqueue bloody cbq(default) bandwidth 50%
-oldqueue germans bandwidth 50%
-oldqueue toads bandwidth 50%
+++ /dev/null
-oldqueue root_lo0 on lo0 bandwidth 10Mb priority 0 cbq( wrr root ) {bloody, germans}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue bloody on lo0 bandwidth 5Mb cbq( default )
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue germans on lo0 bandwidth 5Mb
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue root_tun1000000 on tun1000000 bandwidth 10Mb priority 0 cbq( wrr root ) {bloody, toads}
- [ qid=2 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue bloody on tun1000000 bandwidth 5Mb cbq( default )
- [ qid=3 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue toads on tun1000000 bandwidth 5Mb
- [ qid=5 ifname=tun1000000 ifbandwidth=10Mb ]
+++ /dev/null
-# verify the queue IDs on the rules are set correctly
-
-altq on lo0 tbrsize 1824 priq bandwidth 10Mb queue { praise wim hi }
-oldqueue praise priq(default)
-oldqueue wim priority 15
-oldqueue hi priority 7
-pass in on lo0 proto tcp to port 22 keep state queue(hi wim)
-pass in proto tcp to port 22 keep state queue(hi wim)
-pass in proto tcp to port 22 keep state queue wim
-pass in proto tcp to port 25 keep state queue praise
+++ /dev/null
-oldqueue praise on lo0 priq( default )
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue wim on lo0 priority 15
- [ qid=2 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue hi on lo0 priority 7
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-@0 pass in on lo0 proto tcp from any to any port = 22 flags S/SA keep state queue(hi, wim)
- [ Skip steps: d=end f=end p=end sa=end sp=end da=end dp=3 ]
- [ queue: qname=hi qid=3 pqname=wim pqid=2 ]
-@1 pass in proto tcp from any to any port = 22 flags S/SA keep state queue(hi, wim)
- [ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=3 ]
- [ queue: qname=hi qid=3 pqname=wim pqid=2 ]
-@2 pass in proto tcp from any to any port = 22 flags S/SA keep state queue wim
- [ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end ]
- [ queue: qname=wim qid=2 pqname= pqid=2 ]
-@3 pass in proto tcp from any to any port = 25 flags S/SA keep state queue praise
- [ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=end ]
- [ queue: qname=praise qid=1 pqname= pqid=1 ]
+++ /dev/null
-# verify the queue IDs on the rules are set correctly
-
-altq on lo0 tbrsize 1824 cbq bandwidth 10Mb queue { wim, the minibar is empty }
-oldqueue wim bandwidth 10% cbq(default)
-oldqueue the bandwidth 10%
-oldqueue minibar bandwidth 30% priority 7
-oldqueue is bandwidth 10%
-oldqueue empty bandwidth 40%
-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
+++ /dev/null
-oldqueue root_lo0 on lo0 bandwidth 10Mb priority 0 cbq( wrr root ) {wim, the, minibar, is, empty}
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue wim on lo0 bandwidth 1Mb cbq( default )
- [ qid=2 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue the on lo0 bandwidth 1Mb
- [ qid=3 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue minibar on lo0 bandwidth 3Mb priority 7
- [ qid=4 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue is on lo0 bandwidth 1Mb
- [ qid=5 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue empty on lo0 bandwidth 4Mb
- [ qid=6 ifname=lo0 ifbandwidth=10Mb ]
-@0 pass in on lo0 proto tcp from any to any port = 22 flags S/SA 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=3 pqname=minibar pqid=4 ]
-@1 pass in proto tcp from any to any port = 22 flags S/SA 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=5 pqname=empty pqid=6 ]
-@2 pass in proto tcp from any to any port = 22 flags S/SA keep state queue the
- [ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end ]
- [ queue: qname=the qid=3 pqname= pqid=3 ]
-@3 pass in proto tcp from any to any port = 25 flags S/SA 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=2 pqname= pqid=2 ]
+++ /dev/null
-# more complicated case to provoke queue id assignment errors:
-# -differently named queues have same priority, must get different qids
-# goes back to the historical queue ID assignment algorithm with priq
-# was: qid = priority + 1
-
-altq on lo0 tbrsize 1824 bandwidth 10Mb priq queue eins
-oldqueue eins priority 2 priq(default)
-
-altq on tun1000000 tbrsize 1824 bandwidth 33600b priq queue zwei
-oldqueue zwei priority 2 priq(default)
-
-
+++ /dev/null
-oldqueue eins on lo0 priority 2 priq( default )
- [ qid=1 ifname=lo0 ifbandwidth=10Mb ]
-oldqueue zwei on tun1000000 priority 2 priq( default )
- [ qid=2 ifname=tun1000000 ifbandwidth=33.60Kb ]
+++ /dev/null
-# queuespec limited to interface(s)
-
-altq on { tun1000000 tun1000001 } priq bandwidth 10Mb queue { one two }
-oldqueue one priority 1 priq(default)
-oldqueue two on tun1000000 priority 15
-oldqueue two on tun1000001 priority 0
-
+++ /dev/null
-oldqueue one on tun1000000 priq( default )
- [ qid=1 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue one on tun1000001 priq( default )
- [ qid=1 ifname=tun1000001 ifbandwidth=10Mb ]
-oldqueue two on tun1000000 priority 15
- [ qid=2 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue two on tun1000001 priority 0
- [ qid=2 ifname=tun1000001 ifbandwidth=10Mb ]
+++ /dev/null
-# queuespec limited to interface(s): negation
-
-altq on { tun1000000 tun1000001 } priq bandwidth 10Mb queue { one two }
-oldqueue one priority 1 priq(default)
-oldqueue two on tun1000000 priority 15
-oldqueue two on ! tun1000000 priority 0
-
-
+++ /dev/null
-oldqueue one on tun1000000 priq( default )
- [ qid=1 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue one on tun1000001 priq( default )
- [ qid=1 ifname=tun1000001 ifbandwidth=10Mb ]
-oldqueue two on tun1000000 priority 15
- [ qid=2 ifname=tun1000000 ifbandwidth=10Mb ]
-oldqueue two on tun1000001 priority 0
- [ qid=2 ifname=tun1000001 ifbandwidth=10Mb ]
+++ /dev/null
-ext_if="lo0"
-
-altq on $ext_if priq bandwidth 10Mb tbrsize 1824 \
- queue { pri-low pri-med pri-high }
-oldqueue pri-low priority 0
-oldqueue pri-med priority 1 priq(default)
-oldqueue pri-high priority 2
+++ /dev/null
-ext_if = "lo0"
-altq on lo0 priq bandwidth 10Mb tbrsize 1824 queue { pri-low pri-med pri-high }
-oldqueue pri-low priority 0
-oldqueue pri-med priq( default )
-oldqueue pri-high priority 2
+++ /dev/null
-#test tbrsize calculation
-
-altq on lo1000010 bandwidth 10Mb cbq queue { openbsd rocks }
-oldqueue openbsd cbq(default)
+++ /dev/null
-altq on lo1000010 cbq bandwidth 10Mb tbrsize 6000 queue { openbsd rocks }
-oldqueue openbsd cbq( default )
+++ /dev/null
-#test tbrsize calculation
-
-altq on lo1000010 bandwidth 10Mb cbq queue { openbsd rocks }
-oldqueue openbsd cbq(default)
+++ /dev/null
-altq on lo1000010 cbq bandwidth 10Mb tbrsize 32000 queue { openbsd rocks }
-oldqueue openbsd cbq( default )