summaryrefslogtreecommitdiff
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-04-28 14:28:00 -0700
committerPaul Jakma <paul@quagga.net>2009-06-18 20:18:27 +0100
commit81cce0185e23b6ecd2ab98ab34182901226bcf9e (patch)
tree24a8fa282d80b9dab623bb26fbbec731c0c8b34a /zebra/redistribute.c
parent82f5ee1ead0aa83f83f918abfc3f5071741a56e5 (diff)
[cleanup] Use correct buffer size for inet_ntop()
Don't need big buffer 1024 to hold IPV4 (INET_ADDRSTRLEN) or IPv6 (INET6_ADDRSTRLEN) message.
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r--zebra/redistribute.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index b7bd5674..a8107aeb 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -369,13 +369,14 @@ zebra_interface_address_add_update (struct interface *ifp,
struct listnode *node, *nnode;
struct zserv *client;
struct prefix *p;
- char buf[BUFSIZ];
if (IS_ZEBRA_DEBUG_EVENT)
{
+ char buf[INET6_ADDRSTRLEN];
+
p = ifc->address;
zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s/%d on %s",
- inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
+ inet_ntop (p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN),
p->prefixlen, ifc->ifp->name);
}
@@ -394,13 +395,14 @@ zebra_interface_address_delete_update (struct interface *ifp,
struct listnode *node, *nnode;
struct zserv *client;
struct prefix *p;
- char buf[BUFSIZ];
if (IS_ZEBRA_DEBUG_EVENT)
{
+ char buf[INET6_ADDRSTRLEN];
+
p = ifc->address;
zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s/%d on %s",
- inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
+ inet_ntop (p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN),
p->prefixlen, ifc->ifp->name);
}