]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Ensure we are not using AFI_MAX
authorDonald Sharp <sharpd@nvidia.com>
Wed, 27 Jul 2022 13:36:17 +0000 (09:36 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 27 Jul 2022 13:36:17 +0000 (09:36 -0400)
commitd880a643d75e1f6a2845a49843c703fc4e5a0610
treed3c62a8089c867d0b04cc25de7eb8700660fbf09
parent8d4abfc9b97584af13b9188b5c1495e465651b09
bgpd: Ensure we are not using AFI_MAX

When using bgp_vty_afi_from_str it can
return AFI_MAX( but in practice never will with
our cli ).  In bgp_default_afi_safi_cmd the code
directly references:
bgp->default_afi[afi][safi] = TRUE;

and if afi is AFI_MAX FRRR would be accessing
memory where it should not be.

Let's just provide some assurances for coverity
that this never happens.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_vty.c