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>
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index c297979..cf78a54 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -180,6 +180,7 @@
{
struct zebra_if *zi=ifp->info;
struct irdp_interface *irdp=&zi->irdp;
+ char buf[PREFIX_STRLEN];
u_int32_t dst;
u_int32_t ttl=1;
@@ -191,10 +192,9 @@
dst = htonl(INADDR_ALLHOSTS_GROUP);
if(irdp->flags & IF_DEBUG_MESSAGES)
- zlog_debug("IRDP: TX Advert on %s %s/%d Holdtime=%d Preference=%d",
+ zlog_debug("IRDP: TX Advert on %s %s Holdtime=%d Preference=%d",
ifp->name,
- inet_ntoa(p->u.prefix4),
- p->prefixlen,
+ prefix2str(p, buf, sizeof buf),
irdp->flags & IF_SHUTDOWN? 0 : irdp->Lifetime,
get_pref(irdp, p));