mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 03:53:38 +00:00
Merge pull request #10325 from donaldsharp/peer_conditional_adv_cleanup
bgpd: Remove unneeded loop over all peers
This commit is contained in:
commit
4be03f305b
@ -1803,27 +1803,18 @@ void bgp_attr_add_gshut_community(struct attr *attr)
|
|||||||
/* Notify BGP Conditional advertisement scanner process. */
|
/* Notify BGP Conditional advertisement scanner process. */
|
||||||
void bgp_notify_conditional_adv_scanner(struct update_subgroup *subgrp)
|
void bgp_notify_conditional_adv_scanner(struct update_subgroup *subgrp)
|
||||||
{
|
{
|
||||||
struct peer *temp_peer;
|
|
||||||
struct peer *peer = SUBGRP_PEER(subgrp);
|
struct peer *peer = SUBGRP_PEER(subgrp);
|
||||||
struct listnode *temp_node, *temp_nnode = NULL;
|
|
||||||
afi_t afi = SUBGRP_AFI(subgrp);
|
afi_t afi = SUBGRP_AFI(subgrp);
|
||||||
safi_t safi = SUBGRP_SAFI(subgrp);
|
safi_t safi = SUBGRP_SAFI(subgrp);
|
||||||
struct bgp *bgp = SUBGRP_INST(subgrp);
|
|
||||||
struct bgp_filter *filter = &peer->filter[afi][safi];
|
struct bgp_filter *filter = &peer->filter[afi][safi];
|
||||||
|
|
||||||
if (!ADVERTISE_MAP_NAME(filter))
|
if (!ADVERTISE_MAP_NAME(filter))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(bgp->peer, temp_node, temp_nnode, temp_peer)) {
|
if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
|
||||||
if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
|
return;
|
||||||
continue;
|
|
||||||
|
|
||||||
if (peer != temp_peer)
|
peer->advmap_table_change = true;
|
||||||
continue;
|
|
||||||
|
|
||||||
temp_peer->advmap_table_change = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user