START sys/net/pf_table 2024-11-22T00:11:49Z ==== hit ==== pfctl -q -a regress/ttest -Fa || exit 0 pfctl: Anchor does not exist pfctl -qt __regress_tbl -T add -f /usr/src/regress/sys/net/pf_table/table.in date >stamp-setup for i in `cat /usr/src/regress/sys/net/pf_table/table.hit`; do echo -n "hit $i "; pfctl -qt __regress_tbl -T test $i || exit 1; echo success; done; exit 0 hit 192.0.2.0 success hit 192.0.2.1 success hit 192.0.2.40 success hit 192.0.2.42 success hit 192.0.2.63 success hit 192.0.2.68 success hit 198.51.100.0 success hit 198.51.100.1 success hit 198.51.100.254 success hit 198.51.100.255 success hit 203.0.113.13 success hit 2001:db8:1:: success hit 2001:db8:1:0080::0 success hit 2001:db8:1:00ff:ffff:ffff:ffff:ffff success hit 2001:db8:1:0200::0 success hit 2001:db8:1:03ff:ffff:ffff:ffff:ffff success hit 2001:db8:1:0800::0 success hit 2001:db8:1:0fff:ffff:ffff:ffff:ffff success hit 2001:db8:1:2000::0 success hit 2001:db8:1:3fff:ffff:ffff:ffff:ffff success hit 2001:db8:1:8000::0 success hit 2001:db8:1:ffff:ffff:ffff:ffff:ffff success hit 2001:db8:c0:ffee::1 success hit 2001:db8:c0:ffee:ffff:ffff:ffff:ffff success hit 2001:db8:c0:ffee:feec:: success hit 2001:db8:c0:ffee:feec:ffff:ffff:ffff success hit 2001:db8:c0:ffee:feee:: success hit 2001:db8:c0:ffee:feee::1 success hit 2001:db8:c0:ffee:ffff::dead success ==== miss ==== for i in `cat /usr/src/regress/sys/net/pf_table/table.miss`; do echo -n "miss $i "; pfctl -qt __regress_tbl -T test $i && exit 1; echo success; done; exit 0 miss 0.0.0.1 success miss 12.13.14.15 success miss 192.0.2.37 success miss 192.0.2.41 success miss 192.0.2.64 success miss 192.0.2.65 success miss 192.0.2.66 success miss 192.0.2.67 success miss 192.168.0.1 success miss 192.168.0.4 success miss 192.168.0.7 success miss 192.168.0.16 success miss 192.168.0.31 success miss 192.168.0.64 success miss 192.168.0.127 success miss 192.168.1.0 success miss 192.168.1.255 success miss 192.168.4.0 success miss 192.168.7.255 success miss 192.168.16.0 success miss 192.168.31.255 success miss 2001:db8:1:0100::0 success miss 2001:db8:1:01ff:ffff:ffff:ffff:ffff success miss 2001:db8:1:0400::0 success miss 2001:db8:1:07ff:ffff:ffff:ffff:ffff success miss 2001:db8:1:1000::0 success miss 2001:db8:1:1fff:ffff:ffff:ffff:ffff success miss 2001:db8:1:4000::0 success miss 2001:db8:1:7fff:ffff:ffff:ffff:ffff success miss 2001:db8:c0:ffee::babe success miss 2001:db8:c0:ffee:feed:: success miss 2001:db8:c0:ffee:feed::1 success miss 2001:db8:c0:ffee:feed::dead success miss 2001:db8:c0:ffee:feed:ffff:ffff:fffe success miss 2001:db8:c0:ffee:feed:ffff:ffff:ffff success ==== cleanup ==== rm -f stamp-setup pfctl -qt __regress_tbl -T kill pfctl -q -a regress/ttest -Fr pfctl -q -a regress/ttest -qt instance -T kill ==== flags ==== loading pf-reftab,conf (tables referenced by rules only) pass in from to pfctl -a regress/ttest -f pf-reftab.conf tables and should both have ----r-- pfctl -a regress/ttest -sT -vg | diff table-ref.out - creating table on command line, flags should be: -pa-r-- instance@regress/ttest ----r-- reference@regress/ttest pfctl -a regress/ttest -t instance -T add 192.168.1.0/24 1/1 addresses added. pfctl -a regress/ttest -sT -vg | diff table-persist.out - flushing rules pfctl -a regress/ttest -Fr rules cleared table should be gone, table should stay pfctl -a regress/ttest -sT -vg | diff table-refgone.out - loading pf-instab.conf table { 192.168.1.0/24 } pass in from to pfctl -a regress/ttest -f pf-instab.conf table loses -p- flag: --a-r-- instance@regress/ttest ----r-- reference@regress/ttest pfctl -a regress/ttest -sT -vg | diff table-pgone.out - flusing rules, both tables should be gone pfctl -a regress/ttest -Fr rules cleared anchor regress/ttest must be gone pfctl -a regress/ttest -sr 2>&1 | grep 'pfctl: Anchor does not exist' pfctl: Anchor does not exist PASS sys/net/pf_table Duration 0m00.38s