mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-25 07:28:41 +00:00
bgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED
Just was blind when not seing it's already dup'ed above:
``` if (peer->sort == BGP_PEER_EBGP
&& (!CHECK_FLAG(peer->af_flags[afi][safi],
PEER_FLAG_AS_PATH_UNCHANGED)
|| attr->aspath->segments == NULL)
&& (!CHECK_FLAG(peer->af_flags[afi][safi],
PEER_FLAG_RSERVER_CLIENT))) {
aspath = aspath_dup(attr->aspath); <<<<<<<<<<<<<<<
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 9930441c66
)
This commit is contained in:
parent
9a72aeeb04
commit
35b2225b90
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user