]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: handle route notification with no nexthops 5452/head
authorMark Stapp <mjs@voltanet.io>
Thu, 12 Dec 2019 14:53:55 +0000 (09:53 -0500)
committerMark Stapp <mjs@voltanet.io>
Thu, 12 Dec 2019 17:55:51 +0000 (12:55 -0500)
Handle the special case where a route update contains
no installed nexthops - that means the route is not
installed.

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

index fb5dadd2d6228e4e2439b49703434c295bc1490b..f375036db2bb597d5c839cc47bc56efe59aa78c7 100644 (file)
@@ -1369,6 +1369,14 @@ static bool rib_update_re_from_ctx(struct route_entry *re,
 
        ctx_nexthop = dplane_ctx_get_ng(ctx)->nexthop;
 
+       /* Nothing installed - we can skip some of the checking/comparison
+        * of nexthops.
+        */
+       if (ctx_nexthop == NULL) {
+               changed_p = true;
+               goto no_nexthops;
+       }
+
        /* Get the first `installed` one to check against.
         * If the dataplane doesn't set these to be what was actually installed,
         * it will just be whatever was in re->nhe->nhg?
@@ -1431,6 +1439,8 @@ static bool rib_update_re_from_ctx(struct route_entry *re,
                goto done;
        }
 
+no_nexthops:
+
        /* FIB nexthop set differs from the RIB set:
         * create a fib-specific nexthop-group
         */