Merge pull request #13634 from yyuanam/fix_bgp_core

bgpd: fix bgpd core when unintern attr
This commit is contained in:
Donatas Abraitis 2023-05-31 08:57:40 +03:00 committed by GitHub
commit 549f664d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4682,6 +4682,10 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
* there! (JK)
* Folks, talk to me: what is reasonable here!?
*/
/* Make sure dup aspath before the modification */
if (aspath == attr->aspath)
aspath = aspath_dup(attr->aspath);
aspath = aspath_delete_confed_seq(aspath);
stream_putc(s,