diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-29 21:35:07 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-29 21:35:07 -0500 |
| commit | 2da33d6b3acf63f3386c70c43907f529406e8151 (patch) | |
| tree | 62e4d54f897e7d0464a283d693a14bf9bae69e0b /zebra/redistribute.c | |
| parent | 2b697c3d47161101443ea11492396424eb9a2310 (diff) | |
zebra: Convert route entry id number to string in debugs
The route entry being displayed in debugs was displaying
the originating route type as a number. While numbers
are cool, I for one am not terribly interested in
memorizing them. Modify the (type %d) to a (%s) to
just list the string type of the route.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/redistribute.c')
| -rw-r--r-- | zebra/redistribute.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c index c5769ae06f..2c5350fceb 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -159,10 +159,10 @@ void redistribute_update(const struct prefix *p, const struct prefix *src_p, if (IS_ZEBRA_DEBUG_RIB) { zlog_debug( - "%u:%s: Redist update re %p (type %d), old %p (type %d)", + "%u:%s: Redist update re %p (%s), old %p (%s)", re->vrf_id, prefix2str(p, buf, sizeof(buf)), - re, re->type, prev_re, - prev_re ? prev_re->type : -1); + re, zebra_route_string(re->type), prev_re, + prev_re ? zebra_route_string(prev_re->type) : "None"); } afi = family2afi(p->family); @@ -229,8 +229,9 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p, if (IS_ZEBRA_DEBUG_RIB) { inet_ntop(p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN); - zlog_debug("%u:%s/%d: Redist delete re %p (type %d)", - re->vrf_id, buf, p->prefixlen, re, re->type); + zlog_debug("%u:%s/%d: Redist delete re %p (%s)", + re->vrf_id, buf, p->prefixlen, re, + zebra_route_string(re->type)); } /* Add DISTANCE_INFINITY check. */ |
