summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-05-27 18:46:39 +0200
committerMark Stapp <mjs@voltanet.io>2020-07-07 19:14:01 +0200
commit8b85b2cb59a288794f81e1b456c1c328bd4c6cea (patch)
tree954f60b1fb86fd48d1792268bd376c34b0143c77 /sharpd
parentzebra: skip un-installed recursive match (diff)
downloadfrr-8b85b2cb59a288794f81e1b456c1c328bd4c6cea.tar.xz
frr-8b85b2cb59a288794f81e1b456c1c328bd4c6cea.zip
sharpd: be explicit if nht is uninstalled
Emit a debug if sharpd gets a nexthop-tracking message without any nexthops. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_zebra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index baa4e2ad5..20db86cfb 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -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];