summaryrefslogtreecommitdiffstats
path: root/zebra/interface.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/interface.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/interface.c')
-rw-r--r--zebra/interface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 54d8b103..80eb6aa9 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1593,10 +1593,9 @@ if_config_write (struct vty *vty)
{
char buf[INET6_ADDRSTRLEN];
p = ifc->address;
- vty_out (vty, " ip%s address %s/%d",
+ vty_out (vty, " ip%s address %s",
p->family == AF_INET ? "" : "v6",
- inet_ntop (p->family, &p->u.prefix, buf, sizeof(buf)),
- p->prefixlen);
+ prefix2str (p, buf, sizeof(buf)));
if (ifc->label)
vty_out (vty, " label %s", ifc->label);