]> git.puffer.fish Git - matthieu/frr.git/commitdiff
sharpd: be explicit if nht is uninstalled
authorMark Stapp <mjs@voltanet.io>
Wed, 27 May 2020 16:46:39 +0000 (12:46 -0400)
committerMark Stapp <mjs@voltanet.io>
Tue, 7 Jul 2020 17:14:01 +0000 (13:14 -0400)
Emit a debug if sharpd gets a nexthop-tracking message
without any nexthops.

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

index baa4e2ad5b8f14de939907a3a6e7a5f2830aa9c1..20db86cfba309074ef6fe814c53325d9cf2906ee 100644 (file)
@@ -435,6 +435,12 @@ static int sharp_debug_nexthops(struct zapi_route *api)
        int i;
        char buf[PREFIX_STRLEN];
 
+       if (api->nexthop_num == 0) {
+               zlog_debug(
+                       "        Not installed");
+               return 0;
+       }
+
        for (i = 0; i < api->nexthop_num; i++) {
                struct zapi_nexthop *znh = &api->nexthops[i];