Merge pull request #11706 from donaldsharp/safi_hate

bgpd: Safi can be SAFI_MAX which would allow a write beyond alloced
This commit is contained in:
Donatas Abraitis 2022-07-29 15:30:03 +03:00 committed by GitHub
commit fbc3ab74ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3865,6 +3865,7 @@ DEFPY(bgp_default_afi_safi, bgp_default_afi_safi_cmd,
else
safi = bgp_vty_safi_from_str(safi_str);
assert(safi != SAFI_MAX);
if (no)
bgp->default_af[afi][safi] = false;
else {