diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-18 21:47:10 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-18 21:47:10 +0200 |
commit | 0a7be32866d8f9bf8618848494c1c19609e45c5c (patch) | |
tree | c6c05f61af8bc11ff701798dc87c098c8053b279 /zebra/zebra_rnh.h | |
parent | Merge pull request #4495 from donaldsharp/pim_debug_expiry (diff) | |
download | frr-0a7be32866d8f9bf8618848494c1c19609e45c5c.tar.xz frr-0a7be32866d8f9bf8618848494c1c19609e45c5c.zip |
zebra: Display a bit better debugging for rnh tracking
Add a expected count for the route node we will be processing
as part of nexthop resolution and modify the type to display
a useful string of what the type is instead of a number.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_rnh.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h index 95a394118..c7d2c0d29 100644 --- a/zebra/zebra_rnh.h +++ b/zebra/zebra_rnh.h @@ -43,6 +43,18 @@ static inline int rnh_resolve_via_default(int family) return 0; } +static inline const char *rnh_type2str(rnh_type_t type) +{ + switch (type) { + case RNH_NEXTHOP_TYPE: + return "Nexthop"; + case RNH_IMPORT_CHECK_TYPE: + return "Import"; + } + + return "ERROR"; +} + extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type, bool *exists); extern struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid, |