Merge pull request #12902 from FRRouting/mergify/bp/dev/8.5/pr-12900

bgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED (backport #12900)
This commit is contained in:
Donatas Abraitis 2023-02-26 14:22:02 +02:00 committed by GitHub
commit f0b263d679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4364,7 +4364,6 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
* if the peer belongs to us.
*/
if (bgp_confederation_peers_check(bgp, peer->as)) {
aspath = aspath_dup(attr->aspath);
aspath = aspath_add_confed_seq(aspath,
peer->local_as);
} else {