]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: Convert bgp_packet_mpattr_prefix to use an enum for safi's
authorDonald Sharp <sharpd@nvidia.com>
Fri, 16 Dec 2022 13:43:16 +0000 (08:43 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 16 Dec 2022 13:43:16 +0000 (08:43 -0500)
commit233b1a386001b4a2e95c4b32faffc5ab4f5ef63a
tree19e0cdfa77a3a7778ce2590579e056e0283f4d4a
parent722e8011e1e8e17e9f9c4c2dcf061ad4b1392982
bgpd: Convert bgp_packet_mpattr_prefix to use an enum for safi's

The function bgp_packet_mpattr_prefix was using an if statement
to encode packets to the peer.  Change it to a switch and make
it handle all the cases and fail appropriately when something
has gone wrong.  Hopefully in the future when a new afi/safi
is added we can catch it by compilation breaking instead of
weird runtime errors

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