diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-07-28 18:32:24 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-28 18:32:24 +0300 |
| commit | 8ff746efcb6218e9947c1b7aa3d17623d20b21e9 (patch) | |
| tree | d4622ad2bdf96707d75fbd30f9c68c23c4af86da | |
| parent | dda5a082af89b1afd405739205ef75196cb40fcc (diff) | |
| parent | d880a643d75e1f6a2845a49843c703fc4e5a0610 (diff) | |
Merge pull request #11695 from donaldsharp/afi_max
bgpd: Ensure we are not using AFI_MAX
| -rw-r--r-- | bgpd/bgp_vty.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 80c8753708..cf23c508f2 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -3855,6 +3855,11 @@ DEFPY(bgp_default_afi_safi, bgp_default_afi_safi_cmd, afi_t afi = bgp_vty_afi_from_str(afi_str); safi_t safi; + /* + * Impossible situation but making coverity happy + */ + assert(afi != AFI_MAX); + if (strmatch(safi_str, "labeled")) safi = bgp_vty_safi_from_str("labeled-unicast"); else |
