diff options
author | Zhiqi Chen <chenzhiqi.123@bytedance.com> | 2023-05-10 16:35:37 +0800 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-05-11 21:40:14 +0200 |
commit | b60fb752e395fddd8bbffe8c90cd285ece0bc846 (patch) | |
tree | d32d72e2cbc4feb239e10ef3fec4843af5b2260d /tests | |
parent | 4ddfdaff1c20ef7199837455741e00261de7fd61 (diff) | |
download | openvswitch-branch-3.0.tar.gz |
dpctl: Fix dereferencing null pointer in parse_ct_limit_zones().branch-3.0
Command with empty string following "dpctl/ct-get-limits zone="
such as "ovs-appctl dpctl/ct-get-limits zone=" will cause
parse_ct_limit_zones() dereferencing null.
Signed-off-by: Zhiqi Chen <chenzhiqi.123@bytedance.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dpctl.at | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/dpctl.at b/tests/dpctl.at index 7454a51ec..d2f1046f8 100644 --- a/tests/dpctl.at +++ b/tests/dpctl.at @@ -135,3 +135,19 @@ AT_CHECK([ovs-appctl dpctl/dump-flows dummy@br0 | sort], [0], [dnl AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0]) OVS_VSWITCHD_STOP AT_CLEANUP + +AT_SETUP([dpctl - ct-get-limits ct-del-limits]) +OVS_VSWITCHD_START +AT_CHECK([ovs-appctl dpctl/ct-get-limits], [0], [default limit=0 +]) +AT_CHECK([ovs-appctl dpctl/ct-get-limits zone=], [0], [default limit=0 +]) +AT_CHECK([ovs-appctl dpctl/ct-get-limits zone=,], [0], [default limit=0 +]) +AT_CHECK([ovs-appctl dpctl/ct-get-limits zone=x], [2], [], + [ovs-vswitchd: invalid zone (Invalid argument) +ovs-appctl: ovs-vswitchd: server returned an error +]) +AT_CHECK([ovs-appctl dpctl/ct-del-limits zone=]) +OVS_VSWITCHD_STOP +AT_CLEANUP
\ No newline at end of file |