arping: validate am->interfaces before check address
May cause pointers point to unexpected non-zero addresses if not validate vec Type: fix Change-Id: Ie4d3343d6734125b98e0dc962e33e0c7514da829 Signed-off-by: GaoChX <chiso.gao@gmail.com>
This commit is contained in:

committed by
chiso.gao@gmail.com

parent
44ec846f4a
commit
5fcec2053e
@ -554,7 +554,8 @@ arping_neighbor_probe_dst (vlib_main_t *vm, arping_args_t *args)
|
||||
arping_intf_t aif;
|
||||
|
||||
/* Disallow multiple sends on the same interface for now. Who needs it? */
|
||||
if (am->interfaces && (am->interfaces[args->sw_if_index] != 0))
|
||||
if ((vec_len (am->interfaces) > args->sw_if_index) &&
|
||||
(am->interfaces[args->sw_if_index] != 0))
|
||||
{
|
||||
error = clib_error_return (
|
||||
0, "arping command is in progress for the same interface. "
|
||||
|
Reference in New Issue
Block a user