Skip to content

Commit

Permalink
bgpd: blabla
Browse files Browse the repository at this point in the history
blable
blalba

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
fdumontet6WIND authored and pguibert6WIND committed Aug 19, 2024
1 parent 8ae3279 commit 5b7af35
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2015,9 +2015,11 @@ static void bgp_peer_remove_private_as(struct bgp *bgp, afi_t afi, safi_t safi,
* need to walk the AS-Path to maintain all instances
* of the peer's ASN to break possible loops.
*/
else
else {
attr->aspath = aspath_remove_private_asns(
attr->aspath, peer->as);
attr->refcnt = 0;
}
}

// 'all' was not specified so the entire aspath must be private
Expand All @@ -2029,13 +2031,15 @@ static void bgp_peer_remove_private_as(struct bgp *bgp, afi_t afi, safi_t safi,
PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE))
attr->aspath = aspath_replace_private_asns(
attr->aspath, bgp->as, peer->as);
else
else {
/*
* Walk the aspath to retain any instances of
* the peer_asn
*/
attr->aspath = aspath_remove_private_asns(
attr->aspath, peer->as);
attr->refcnt = 0;
}
}
}
}
Expand Down

0 comments on commit 5b7af35

Please sign in to comment.