mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 08:57:29 +00:00
pbrd: Prevent attempt at re-install for several scenarios
There exists several places we attempt to re-install the same rule. Figure out when we need to not make an attempt at doing anything and do it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
4d96fd9feb
commit
2fb7892ed1
@ -541,8 +541,11 @@ void pbr_map_check(struct pbr_map_sequence *pbrms)
|
|||||||
pbrms->seqno, pbrms->reason);
|
pbrms->seqno, pbrms->reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi))
|
for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) {
|
||||||
pbr_send_pbr_map(pbrms, pmi, install);
|
if ((install && !pbrms->installed) ||
|
||||||
|
(!install && pbrms->installed))
|
||||||
|
pbr_send_pbr_map(pbrms, pmi, install);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void pbr_map_install(struct pbr_map *pbrm)
|
void pbr_map_install(struct pbr_map *pbrm)
|
||||||
|
@ -312,8 +312,16 @@ static void pbr_nht_find_nhg_from_table_install(struct hash_backet *b,
|
|||||||
if (pnhgc->table_id == *table_id) {
|
if (pnhgc->table_id == *table_id) {
|
||||||
DEBUGD(&pbr_dbg_nht, "%s: Table ID (%u) matches %s",
|
DEBUGD(&pbr_dbg_nht, "%s: Table ID (%u) matches %s",
|
||||||
__PRETTY_FUNCTION__, *table_id, pnhgc->name);
|
__PRETTY_FUNCTION__, *table_id, pnhgc->name);
|
||||||
pnhgc->installed = true;
|
|
||||||
pbr_map_schedule_policy_from_nhg(pnhgc->name);
|
/*
|
||||||
|
* If the table has been re-handled by zebra
|
||||||
|
* and we are already installed no need to do
|
||||||
|
* anything here.
|
||||||
|
*/
|
||||||
|
if (!pnhgc->installed) {
|
||||||
|
pnhgc->installed = true;
|
||||||
|
pbr_map_schedule_policy_from_nhg(pnhgc->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user