diff options
author | Cedric Berger <cedric@cvs.openbsd.org> | 2003-07-19 15:08:31 +0000 |
---|---|---|
committer | Cedric Berger <cedric@cvs.openbsd.org> | 2003-07-19 15:08:31 +0000 |
commit | fbcbf86e5a6b904656fc6838a4b71b42a81a6532 (patch) | |
tree | 8705ad42ed605c4bcb42fad0f4faf0940f5ff9a5 /regress/sbin | |
parent | 3219b7d245c023aa469b9942e25e542d72de9174 (diff) |
Verify that no skip step apply to theses rules for the source address.
This actually uncovers a little buglet in skip steps calculation.
Diffstat (limited to 'regress/sbin')
-rw-r--r-- | regress/sbin/pfctl/Makefile | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf82.in | 16 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf82.loaded | 52 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf82.ok | 13 |
4 files changed, 84 insertions, 3 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index d11d0e8f81c..84e6b6af683 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.160 2003/07/19 14:18:09 cedric Exp $ +# $OpenBSD: Makefile,v 1.161 2003/07/19 15:08:30 cedric Exp $ # TARGETS # pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok @@ -13,14 +13,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+=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 +PFTESTS+=74 75 76 77 78 79 80 81 82 PFFAIL=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 PFFAIL+=28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 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 21 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 +PFLOAD+=72 73 74 75 76 77 78 79 80 81 82 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/pf82.in b/regress/sbin/pfctl/pf82.in new file mode 100644 index 00000000000..7a071218921 --- /dev/null +++ b/regress/sbin/pfctl/pf82.in @@ -0,0 +1,16 @@ +# skip step optimization involving dynaddr, tables, no-route +# no source address optimisation should be done on theses rules + +pass inet from (lo0) +pass inet from !(lo0) +pass inet from (lo0) +pass inet6 from (lo0) +pass from <foo> +pass from !<foo> +pass from <foo> +pass inet from <bar> +pass from <bar> +pass inet6 from <foo> +pass from <foo> +pass from no-route +pass inet from no-route diff --git a/regress/sbin/pfctl/pf82.loaded b/regress/sbin/pfctl/pf82.loaded new file mode 100644 index 00000000000..d7a1c826026 --- /dev/null +++ b/regress/sbin/pfctl/pf82.loaded @@ -0,0 +1,52 @@ +@0 pass inet from (lo0) to any + [ Skip steps: i=end d=end f=3 p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@1 pass inet from ! (lo0) to any + [ Skip steps: i=end d=end f=3 p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@2 pass inet from (lo0) to any + [ Skip steps: i=end d=end p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@3 pass inet6 from (lo0) to any + [ Skip steps: i=end d=end p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@4 pass from <foo:*> to any + [ Skip steps: i=end d=end f=7 p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@5 pass from ! <foo:*> to any + [ Skip steps: i=end d=end f=7 p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@6 pass from <foo:*> to any + [ Skip steps: i=end d=end p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@7 pass inet from <bar:*> to any + [ Skip steps: i=end d=end p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@8 pass from <bar:*> to any + [ Skip steps: i=end d=end p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@9 pass inet6 from <foo:*> to any + [ Skip steps: i=end d=end p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@10 pass from <foo:*> to any + [ Skip steps: i=end d=end f=12 p=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@11 pass from no-route to any + [ Skip steps: i=end d=end p=end sa=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] +@12 pass inet from no-route to any + [ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=end ] + [ queue: qname= qid=0 pqname= pqid=0 ] + [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] diff --git a/regress/sbin/pfctl/pf82.ok b/regress/sbin/pfctl/pf82.ok new file mode 100644 index 00000000000..44bd23345b8 --- /dev/null +++ b/regress/sbin/pfctl/pf82.ok @@ -0,0 +1,13 @@ +pass inet from (lo0) to any +pass inet from ! (lo0) to any +pass inet from (lo0) to any +pass inet6 from (lo0) to any +pass from <foo> to any +pass from ! <foo> to any +pass from <foo> to any +pass inet from <bar> to any +pass from <bar> to any +pass inet6 from <foo> to any +pass from <foo> to any +pass from no-route to any +pass inet from no-route to any |