]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: align dplane notify processing with nhg work
authorMark Stapp <mjs@voltanet.io>
Mon, 2 Dec 2019 17:03:57 +0000 (12:03 -0500)
committerMark Stapp <mjs@voltanet.io>
Mon, 9 Dec 2019 21:19:14 +0000 (16:19 -0500)
The processing of dataplane route notifications was a little
off-target after the nexthop-group re-work. This should allow
notifications to work better.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_rib.c

index d525da26ee24b1ab07d753fa325341de0af52cd5..dbd6daae9f376958773252ba3aa33e46af6baeaa 100644 (file)
@@ -1808,9 +1808,12 @@ static void rib_process_dplane_notify(struct zebra_dplane_ctx *ctx)
         * and then again if there's been a change.
         */
        start_count = 0;
-       for (ALL_NEXTHOPS_PTR(rib_active_nhg(re), nexthop)) {
-               if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB))
-                       start_count++;
+
+       if (CHECK_FLAG(re->status, ROUTE_ENTRY_INSTALLED)) {
+               for (ALL_NEXTHOPS_PTR(rib_active_nhg(re), nexthop)) {
+                       if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB))
+                               start_count++;
+               }
        }
 
        /* Update zebra's nexthop FIB flags based on the context struct's
@@ -1820,10 +1823,8 @@ static void rib_process_dplane_notify(struct zebra_dplane_ctx *ctx)
 
        if (!fib_changed) {
                if (debug_p)
-                       zlog_debug("%u:%s No change from dplane notification",
+                       zlog_debug("%u:%s dplane notification: rib_update returns FALSE",
                                   dplane_ctx_get_vrf(ctx), dest_str);
-
-               goto done;
        }
 
        /*