diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-05-23 10:08:41 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-09 15:08:05 +0200 |
commit | 35d921cc20eca237893492dafe661f94d4e87837 (patch) | |
tree | 7ba59ff60352c1bb87134ee62177f4bbcab4de87 /zebra/ioctl_solaris.c | |
parent | zebra/vty: use prefix2str and unify show ip/ipv6 route code (diff) | |
download | frr-35d921cc20eca237893492dafe661f94d4e87837.tar.xz frr-35d921cc20eca237893492dafe661f94d4e87837.zip |
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>
(cherry picked from commit be6335d682c5ee1b6930345193eda875705fbab2)
Diffstat (limited to 'zebra/ioctl_solaris.c')
-rw-r--r-- | zebra/ioctl_solaris.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c index 7c1e602e2..19be21ded 100644 --- a/zebra/ioctl_solaris.c +++ b/zebra/ioctl_solaris.c @@ -407,11 +407,11 @@ if_unset_flags (struct interface *ifp, uint64_t flags) int if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) { - char addrbuf[INET_ADDRSTRLEN]; + char addrbuf[PREFIX_STRLEN]; - inet_ntop (AF_INET6, &(((struct prefix_ipv6 *) (ifc->address))->prefix), - addrbuf, sizeof (addrbuf)); - zlog_warn ("Can't set %s on interface %s", addrbuf, ifp->name); + zlog_warn ("Can't set %s on interface %s", + prefix2str(ifc->address->prefix, addrbuf, sizeof(addrbuf)), + ifp->name); return 0; @@ -420,11 +420,11 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) int if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) { - char addrbuf[INET_ADDRSTRLEN]; + char addrbuf[PREFIX_STRLEN]; - inet_ntop (AF_INET6, &(((struct prefix_ipv6 *) (ifc->address))->prefix), - addrbuf, sizeof (addrbuf)); - zlog_warn ("Can't delete %s on interface %s", addrbuf, ifp->name); + zlog_warn ("Can't delete %s on interface %s", + prefix2str(ifc->address->prefix, addrbuf, sizeof(addrbuf)), + ifp->name); return 0; |