diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c index ea79320a71..6931e9ad2d 100644 --- a/pbrd/pbr_map.c +++ b/pbrd/pbr_map.c @@ -541,8 +541,11 @@ void pbr_map_check(struct pbr_map_sequence *pbrms) pbrms->seqno, pbrms->reason); } - for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) - pbr_send_pbr_map(pbrms, pmi, install); + for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) { + if ((install && !pbrms->installed) || + (!install && pbrms->installed)) + pbr_send_pbr_map(pbrms, pmi, install); + } } void pbr_map_install(struct pbr_map *pbrm) diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index 1ce8c2104d..c58902cf5e 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -312,8 +312,16 @@ static void pbr_nht_find_nhg_from_table_install(struct hash_backet *b, if (pnhgc->table_id == *table_id) { DEBUGD(&pbr_dbg_nht, "%s: Table ID (%u) matches %s", __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); + } } }