From ab447fdf0788972f4fa23e14f38e2f9518843ae7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 28 Apr 2009 14:30:12 -0700 Subject: Use INET6_ADDRSTRLEN instead of BUFSIZ --- zebra/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 91f18bca..1dd1de7e 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1574,7 +1574,6 @@ if_config_write (struct vty *vty) { struct listnode *node; struct interface *ifp; - char buf[BUFSIZ]; for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) { @@ -1604,10 +1603,11 @@ if_config_write (struct vty *vty) { if (CHECK_FLAG (ifc->conf, ZEBRA_IFC_CONFIGURED)) { + char buf[INET6_ADDRSTRLEN]; p = ifc->address; vty_out (vty, " ip%s address %s/%d", p->family == AF_INET ? "" : "v6", - inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ), + inet_ntop (p->family, &p->u.prefix, buf, sizeof(buf)), p->prefixlen); if (ifc->label) -- cgit v1.2.3