This flag is used internally in zebra only. And it makes no sense
to expose it over the zclient API, as having it set from client
could corrupt the internal state.

Signed-off-by: Timo Teräs <timo.te...@iki.fi>
---
 lib/zebra.h       | 1 -
 zebra/rib.h       | 1 +
 zebra/zebra_rib.c | 8 ++++----
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/zebra.h b/lib/zebra.h
index a5ed20e..dabac0e 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -461,7 +461,6 @@ extern const char *zserv_command_string (unsigned int 
command);
 #define ZEBRA_FLAG_BLACKHOLE          0x04
 #define ZEBRA_FLAG_IBGP               0x08
 #define ZEBRA_FLAG_SELECTED           0x10
-#define ZEBRA_FLAG_CHANGED            0x20
 #define ZEBRA_FLAG_STATIC             0x40
 #define ZEBRA_FLAG_REJECT             0x80
 
diff --git a/zebra/rib.h b/zebra/rib.h
index 94a7419..b392098 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -74,6 +74,7 @@ struct rib
   /* RIB internal status */
   u_char status;
 #define RIB_ENTRY_REMOVED      (1 << 0)
+#define RIB_ENTRY_CHANGED      (1 << 1)
 
   /* Nexthop information. */
   u_char nexthop_num;
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index cc7f48f..5c8322d 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1171,7 +1171,7 @@ nexthop_active_check (struct route_node *rn, struct rib 
*rib,
 /* Iterate over all nexthops of the given RIB entry and refresh their
  * ACTIVE flag. rib->nexthop_active_num is updated accordingly. If any
  * nexthop is found to toggle the ACTIVE flag, the whole rib structure
- * is flagged with ZEBRA_FLAG_CHANGED. The 4th 'set' argument is
+ * is flagged with RIB_ENTRY_CHANGED. The 4th 'set' argument is
  * transparently passed to nexthop_active_check().
  *
  * Return value is the new number of active nexthops.
@@ -1184,7 +1184,7 @@ nexthop_active_update (struct route_node *rn, struct rib 
*rib, int set)
   unsigned int prev_active, prev_index, new_active;
 
   rib->nexthop_active_num = 0;
-  UNSET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED);
+  UNSET_FLAG (rib->status, RIB_ENTRY_CHANGED);
 
   for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next)
   {
@@ -1194,7 +1194,7 @@ nexthop_active_update (struct route_node *rn, struct rib 
*rib, int set)
       rib->nexthop_active_num++;
     if (prev_active != new_active ||
        prev_index != nexthop->ifindex)
-      SET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED);
+      SET_FLAG (rib->status, RIB_ENTRY_CHANGED);
   }
   return rib->nexthop_active_num;
 }
@@ -1468,7 +1468,7 @@ rib_process (struct route_node *rn)
       if (IS_ZEBRA_DEBUG_RIB)
        rnode_debug (rn, "Updating existing route, select %p, fib %p",
                      (void *)select, (void *)fib);
-      if (CHECK_FLAG (select->flags, ZEBRA_FLAG_CHANGED))
+      if (CHECK_FLAG (select->status, RIB_ENTRY_CHANGED))
         {
           if (info->safi == SAFI_UNICAST)
            zfpm_trigger_update (rn, "updating existing route");
-- 
2.4.1


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to