diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-29 21:57:24 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-29 21:57:24 -0700 |
commit | 11bbc07a287d883f3013567f897290859c428286 (patch) | |
tree | 2cc74f86ebf1fc00e95d498198c92f08afb815d2 | |
parent | 8b842e2435f1303e31f5d8bb2ec3a5b1f390e408 (diff) | |
download | quagga-11bbc07a287d883f3013567f897290859c428286.tar.bz2 quagga-11bbc07a287d883f3013567f897290859c428286.tar.xz |
Use INET6_ADDRSTRLEN rather than BUFSIZ
Don't need whole 1K buffer for IPV6 address
-rw-r--r-- | zebra/redistribute.c | 10 |
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); } |