summaryrefslogtreecommitdiffstats
path: root/zebra/redistribute.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/redistribute.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/redistribute.c')
-rw-r--r--zebra/redistribute.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 8d5b4cae..94330aed 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -326,12 +326,12 @@ zebra_interface_address_add_update (struct interface *ifp,
if (IS_ZEBRA_DEBUG_EVENT)
{
- char buf[INET6_ADDRSTRLEN];
+ char buf[PREFIX_STRLEN];
p = ifc->address;
- zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s/%d on %s",
- inet_ntop (p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN),
- p->prefixlen, ifc->ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s on %s",
+ prefix2str (p, buf, sizeof(buf)),
+ ifc->ifp->name);
}
if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
@@ -355,12 +355,12 @@ zebra_interface_address_delete_update (struct interface *ifp,
if (IS_ZEBRA_DEBUG_EVENT)
{
- char buf[INET6_ADDRSTRLEN];
+ char buf[PREFIX_STRLEN];
p = ifc->address;
- zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s/%d on %s",
- inet_ntop (p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN),
- p->prefixlen, ifc->ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s on %s",
+ prefix2str (p, buf, sizeof(buf)),
+ ifc->ifp->name);
}
router_id_del_address(ifc);