summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-04-28 14:30:12 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-04-28 14:30:12 -0700
commitab447fdf0788972f4fa23e14f38e2f9518843ae7 (patch)
tree1d9826178a3428f01ecb0ecf4d164491f2ccc135
parent06f76ed0503fb4d54060419e685b17838e08a05e (diff)
downloadquagga-ab447fdf0788972f4fa23e14f38e2f9518843ae7.tar.bz2
quagga-ab447fdf0788972f4fa23e14f38e2f9518843ae7.tar.xz
Use INET6_ADDRSTRLEN instead of BUFSIZ
-rw-r--r--zebra/interface.c4
1 files changed, 2 insertions, 2 deletions
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)