summaryrefslogtreecommitdiff
path: root/pbrd/pbr_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbrd/pbr_zebra.c')
-rw-r--r--pbrd/pbr_zebra.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c
index a1a2d34ac1..99caf4cb9a 100644
--- a/pbrd/pbr_zebra.c
+++ b/pbrd/pbr_zebra.c
@@ -500,8 +500,20 @@ void pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
struct pbr_map *pbrm = pbrms->parent;
struct stream *s;
- DEBUGD(&pbr_dbg_zebra, "%s: for %s %d", __PRETTY_FUNCTION__, pbrm->name,
- install);
+ DEBUGD(&pbr_dbg_zebra, "%s: for %s %d(%d)",
+ __PRETTY_FUNCTION__, pbrm->name,
+ install, pbrms->installed);
+
+ /*
+ * If we are installed and asked to do so again
+ * just return. If we are not installed and asked
+ * and asked to delete just return;
+ */
+ if (install && pbrms->installed)
+ return;
+
+ if (!install && !pbrms->installed)
+ return;
s = zclient->obuf;
stream_reset(s);