summaryrefslogtreecommitdiffstats
path: root/zebra/rtadv.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/rtadv.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/rtadv.c')
-rw-r--r--zebra/rtadv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 9a3fd265..b3959823 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -1537,7 +1537,7 @@ rtadv_config_write (struct vty *vty, struct interface *ifp)
struct zebra_if *zif;
struct listnode *node;
struct rtadv_prefix *rprefix;
- u_char buf[INET6_ADDRSTRLEN];
+ char buf[PREFIX_STRLEN];
int interval;
if (! rtadv)
@@ -1601,10 +1601,8 @@ rtadv_config_write (struct vty *vty, struct interface *ifp)
for (ALL_LIST_ELEMENTS_RO (zif->rtadv.AdvPrefixList, node, rprefix))
{
- vty_out (vty, " ipv6 nd prefix %s/%d",
- inet_ntop (AF_INET6, &rprefix->prefix.prefix,
- (char *) buf, INET6_ADDRSTRLEN),
- rprefix->prefix.prefixlen);
+ vty_out (vty, " ipv6 nd prefix %s",
+ prefix2str (&rprefix->prefix, buf, sizeof(buf)));
if ((rprefix->AdvValidLifetime != RTADV_VALID_LIFETIME) ||
(rprefix->AdvPreferredLifetime != RTADV_PREFERRED_LIFETIME))
{