summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_fpm.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-05-23 11:08:41 +0300
committerDavid Lamparter <equinox@opensourcerouting.org>2015-06-01 16:50:58 +0200
commitbe6335d682c5ee1b6930345193eda875705fbab2 (patch)
tree2107740224a8a6b3f44241ba71d9be562f138232 /zebra/zebra_fpm.c
parent53a5c39c705f917567d5b1764f1fe12ad5c5e577 (diff)
downloadquagga-be6335d682c5ee1b6930345193eda875705fbab2.tar.bz2
quagga-be6335d682c5ee1b6930345193eda875705fbab2.tar.xz
zebra: use prefix2str for logging where possible
This makes code more robust, consice and readable. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_fpm.c')
-rw-r--r--zebra/zebra_fpm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index e02d1745..896915c2 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -1301,7 +1301,7 @@ void
zfpm_trigger_update (struct route_node *rn, const char *reason)
{
rib_dest_t *dest;
- char buf[INET6_ADDRSTRLEN];
+ char buf[PREFIX_STRLEN];
/*
* Ignore if the connection is down. We will update the FPM about
@@ -1329,9 +1329,8 @@ zfpm_trigger_update (struct route_node *rn, const char *reason)
if (reason)
{
- zfpm_debug ("%s/%d triggering update to FPM - Reason: %s",
- inet_ntop (rn->p.family, &rn->p.u.prefix, buf, sizeof (buf)),
- rn->p.prefixlen, reason);
+ zfpm_debug ("%s triggering update to FPM - Reason: %s",
+ prefix2str (&rn->p, buf, sizeof(buf)), reason);
}
SET_FLAG (dest->flags, RIB_DEST_UPDATE_FPM);