pf tests: Test name handling
Provoke a situation where two interfaces have the same name, and verify pf's reaction to this.
This commit is contained in:
parent
b2e0b24f76
commit
df5ceb3b66
@ -9,6 +9,7 @@ ATF_TESTS_SH+= anchor \
|
|||||||
pass_block \
|
pass_block \
|
||||||
forward \
|
forward \
|
||||||
fragmentation \
|
fragmentation \
|
||||||
|
names \
|
||||||
set_tos \
|
set_tos \
|
||||||
route_to \
|
route_to \
|
||||||
synproxy \
|
synproxy \
|
||||||
|
34
tests/sys/netpfil/pf/names.sh
Executable file
34
tests/sys/netpfil/pf/names.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
. $(atf_get_srcdir)/utils.subr
|
||||||
|
|
||||||
|
atf_test_case "names" "cleanup"
|
||||||
|
names_head()
|
||||||
|
{
|
||||||
|
atf_set descr 'Test overlapping names'
|
||||||
|
atf_set require.user root
|
||||||
|
}
|
||||||
|
|
||||||
|
names_body()
|
||||||
|
{
|
||||||
|
pft_init
|
||||||
|
|
||||||
|
epair=$(pft_mkepair)
|
||||||
|
|
||||||
|
pft_mkjail alcatraz ${epair}b
|
||||||
|
ifconfig ${epair}a name foo
|
||||||
|
jexec alcatraz ifconfig ${epair}b name foo
|
||||||
|
|
||||||
|
jail -r alcatraz
|
||||||
|
ifconfig foo destroy
|
||||||
|
}
|
||||||
|
|
||||||
|
names_cleanup()
|
||||||
|
{
|
||||||
|
pft_cleanup
|
||||||
|
}
|
||||||
|
|
||||||
|
atf_init_test_cases()
|
||||||
|
{
|
||||||
|
atf_add_test_case "names"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user