mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
pflow: observation domain is an unsigned integer
Ensure we print it as such, rather than as a signed integer, as that would lead to confusion. Reported by: Jim Pingle <jimp@netgate.com> Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
8297ff13fb
commit
484e977f24
@ -340,7 +340,7 @@ get(int id)
|
||||
if (! snl_parse_nlmsg(&ss, hdr, &get_parser, &g))
|
||||
continue;
|
||||
|
||||
printf("pflow%d: version %d domain %d", g.id, g.version, g.obs_dom);
|
||||
printf("pflow%d: version %d domain %u", g.id, g.version, g.obs_dom);
|
||||
print_sockaddr(" src ", &g.src.storage);
|
||||
print_sockaddr(" dst ", &g.dst.storage);
|
||||
printf("\n");
|
||||
|
@ -282,6 +282,30 @@ rule_cleanup()
|
||||
pft_cleanup
|
||||
}
|
||||
|
||||
atf_test_case "obs_dom" "cleanup"
|
||||
obs_dom_head()
|
||||
{
|
||||
atf_set descr 'Test configuring observation domain values'
|
||||
atf_set require.user root
|
||||
}
|
||||
|
||||
obs_dom_body()
|
||||
{
|
||||
pflow_init
|
||||
|
||||
vnet_mkjail alcatraz
|
||||
|
||||
pflow=$(jexec alcatraz pflowctl -c)
|
||||
jexec alcatraz pflowctl -s ${pflow} domain 2300000000
|
||||
atf_check -o match:".*domain 2300000000.*" -s exit:0 \
|
||||
jexec alcatraz pflowctl -l
|
||||
}
|
||||
|
||||
obs_dom_cleanup()
|
||||
{
|
||||
pft_cleanup
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case "basic"
|
||||
@ -289,4 +313,5 @@ atf_init_test_cases()
|
||||
atf_add_test_case "v6"
|
||||
atf_add_test_case "nat"
|
||||
atf_add_test_case "rule"
|
||||
atf_add_test_case "obs_dom"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user