table.sh (17dd52dfabf67afde97d032ec897769ed09c76ca) table.sh (01f3f35447b0a43b37ecc71ebb9296aad123cd43)
1# $FreeBSD$
2#
3# SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4#
5# Copyright (c) 2020 Mark Johnston <markj@FreeBSD.org>
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 79 unchanged lines hidden (view full) ---

88 jexec alcatraz pfctl -e
89
90 pft_set_rules alcatraz \
91 "table <foo6> counters { 2001:db8:42::1 }" \
92 "block all" \
93 "pass in from <foo6> to any" \
94 "pass out from any to <foo6>"
95
1# $FreeBSD$
2#
3# SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4#
5# Copyright (c) 2020 Mark Johnston <markj@FreeBSD.org>
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 79 unchanged lines hidden (view full) ---

88 jexec alcatraz pfctl -e
89
90 pft_set_rules alcatraz \
91 "table <foo6> counters { 2001:db8:42::1 }" \
92 "block all" \
93 "pass in from <foo6> to any" \
94 "pass out from any to <foo6>"
95
96 atf_check -s exit:0 -o ignore ping6 -c 3 2001:db8:42::2
96 atf_check -s exit:0 -o ignore ping -6 -c 3 2001:db8:42::2
97
98 atf_check -s exit:0 -e ignore \
99 -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
100 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
101 -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
102 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
103 jexec alcatraz pfctl -t foo6 -T show -vv
104}
105
106v6_counters_cleanup()
107{
108 pft_cleanup
109}
110
111atf_init_test_cases()
112{
113 atf_add_test_case "v4_counters"
114 atf_add_test_case "v6_counters"
115}
97
98 atf_check -s exit:0 -e ignore \
99 -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
100 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
101 -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
102 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
103 jexec alcatraz pfctl -t foo6 -T show -vv
104}
105
106v6_counters_cleanup()
107{
108 pft_cleanup
109}
110
111atf_init_test_cases()
112{
113 atf_add_test_case "v4_counters"
114 atf_add_test_case "v6_counters"
115}