diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-14 21:52:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-14 21:52:15 +0000 |
commit | e8698da4a8aa2ee4aa9f29ecd3ed56fba858001d (patch) | |
tree | 7987284ccda2c620b02f45a6a1f22cb3e6c6aa34 /regress | |
parent | ceeaa78775416bd8773c224676a55236a83e23a3 (diff) |
regression test for include directive (if anyone has a better way to do
this messy include file copy, let me know)
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sbin/pfctl/Makefile | 10 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf95.in | 22 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf95.include | 1 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf95.ok | 12 |
4 files changed, 10 insertions, 35 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index 3a9d39192c1..602d72349c4 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.200 2007/10/13 16:54:43 deraadt Exp $ +# $OpenBSD: Makefile,v 1.201 2007/10/14 21:52:14 deraadt Exp $ # TARGETS # pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok @@ -14,7 +14,7 @@ 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+=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 90 91 92 93 94 +PFTESTS+=74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 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 50 51 52 53 PFSIMPLE=1 2 @@ -98,10 +98,14 @@ selfpf${n}: pf: ${PF_TARGETS} selfpf: ${SELFPF_TARGETS} pf-update: ${PF_UPDATES} -REGRESS_TARGETS+=pf +REGRESS_TARGETS+=pf-include-setup pf REGRESS_TARGETS+=selfpf UPDATE_TARGETS+=pf-update +pf-include-setup: + cp ${.CURDIR}/pf95.include ${.OBJDIR} + chmod og-rwx ${.OBJDIR}/pf95.include + .for n in ${PFSIMPLE} PFSIMPLE_TARGETS+=pfsimple${n} diff --git a/regress/sbin/pfctl/pf95.in b/regress/sbin/pfctl/pf95.in index 049e68fedce..ca93c7391ea 100644 --- a/regress/sbin/pfctl/pf95.in +++ b/regress/sbin/pfctl/pf95.in @@ -1,24 +1,4 @@ set require-order no -# varset allows concatenated strings as numbers -myports = 55 66 -pass in proto tcp from any to any port { $myports } +include "pf95.include" -# queuenames can be numbers -altq on lo0 tbrsize 1824 bandwidth 10Mb priq queue 80 -queue 80 priority 2 priq(default) - -# tablenames can 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 \ - (max-src-conn 100, max-src-conn-rate 10/5, overload <444> flush) - -# filename can be a number -# XXX not easy to test -#table <filetest> file 666 - -# labels, tags, anchors can be numbers -pass in on lo0 from 1.2.3.4 keep state label 88 -pass in on lo0 from 1.2.3.4 keep state tag 57 -pass in on lo0 from 1.2.3.4 keep state tagged 57 -anchor 23 on lo0 diff --git a/regress/sbin/pfctl/pf95.include b/regress/sbin/pfctl/pf95.include new file mode 100644 index 00000000000..983d29a4138 --- /dev/null +++ b/regress/sbin/pfctl/pf95.include @@ -0,0 +1 @@ +set require-order yes diff --git a/regress/sbin/pfctl/pf95.ok b/regress/sbin/pfctl/pf95.ok index 64c002c63ec..99168388bc4 100644 --- a/regress/sbin/pfctl/pf95.ok +++ b/regress/sbin/pfctl/pf95.ok @@ -1,12 +1,2 @@ set require-order no -myports = "55 66" -altq on lo0 priq bandwidth 10Mb tbrsize 1824 queue { 80 } -queue 80 priority 2 priq( default ) -table <444> { 1.2.3.4 } -pass in proto tcp from any to any port = 55 flags S/SA keep state -pass in proto tcp from any to any port = 66 flags S/SA keep state -pass in on lo1000000 inet proto tcp from any to 10.0.0.1 port = www flags S/SA modulate state (source-track rule, max-src-conn 100, max-src-conn-rate 10/5, overload <444> flush, src.track 5) -pass in on lo0 inet from 1.2.3.4 to any flags S/SA keep state label "88" -pass in on lo0 inet from 1.2.3.4 to any flags S/SA keep state tag 57 -pass in on lo0 inet from 1.2.3.4 to any flags S/SA keep state tagged 57 -anchor "23" on lo0 all +set require-order yes |