bfd: use local error index when incrementing node counters 71/35771/2
authorPaul Atkins <patkins@graphiant.com>
Thu, 24 Mar 2022 11:26:16 +0000 (11:26 +0000)
committerDamjan Marion <dmarion@me.com>
Thu, 24 Mar 2022 19:12:47 +0000 (19:12 +0000)
commit0d03284efce17fc088afe8b8a33f01aeeeeecb67
tree90875fc198e35be6965b28efdd6de47f7e85b1fd
parent05ead78945831fbaad6e973d21dfbd9a2c9e2ba4
bfd: use local error index when incrementing node counters

When incrementing node counters with vlib_node_increment_counter
the local error index should be passed in. vlib_node_increment_counter
adds the local index to the nodes base index to get the counter to
write to. If we pass in the global counter index, the offset gets
added again in the fn, and we then potentially write into memory that
is not part of the counter vector.

Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I43be33a51bcb52d520495d326b971c1d848d96b5
src/vnet/bfd/bfd_udp.c