linux-cp: fix seg fault in get_v2 methods 74/40674/3
authorAnton Nikolaev <anikolaev@netgate.com>
Thu, 22 Feb 2024 09:21:45 +0000 (09:21 +0000)
committerMatthew Smith <mgsmith@netgate.com>
Mon, 15 Apr 2024 14:41:21 +0000 (14:41 +0000)
commit4ebe5eef8a696a349105d6bdf21c8c11db938a1d
treee23606793725d2700f09f1ab30570af3d79b40c5
parentd7f0daeccef4fd062e143e0030cf973e2cdf9ef9
linux-cp: fix seg fault in get_v2 methods

vl_api_lcp_itf_pair_get_v2_t_handler method was not be able to
handle invalid sw_if_index, it caused a seg fault.

With this fix, the method checks for an invalid sw_if_index and
sends error back to caller.

Type: fix
Change-Id: I4e89b0cab34f9109c4ce2689021ecfc2786055ab
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
src/plugins/linux-cp/lcp_api.c