diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-30 19:38:45 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-04-18 00:40:17 +0200 |
commit | 2fb7892ed19ebff651d5da3a986350659f719a17 (patch) | |
tree | 89feff90e07dda722deeb48e769b37ba972f8f6a /pbrd/pbr_nht.c | |
parent | zebra: Tell rib_process to actually rethink pbr routes. (diff) | |
download | frr-2fb7892ed19ebff651d5da3a986350659f719a17.tar.xz frr-2fb7892ed19ebff651d5da3a986350659f719a17.zip |
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>
Diffstat (limited to 'pbrd/pbr_nht.c')
-rw-r--r-- | pbrd/pbr_nht.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index 1ce8c2104..c58902cf5 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); + } } } |