summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_nht.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-30 19:38:45 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-18 00:40:17 +0200
commit2fb7892ed19ebff651d5da3a986350659f719a17 (patch)
tree89feff90e07dda722deeb48e769b37ba972f8f6a /pbrd/pbr_nht.c
parentzebra: Tell rib_process to actually rethink pbr routes. (diff)
downloadfrr-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.c12
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);
+ }
}
}