summaryrefslogtreecommitdiff
path: root/bgpd/bgp_fsm.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2012-04-10 16:57:27 +0200
committerDavid Lamparter <equinox@diac24.net>2012-05-02 17:03:34 +0200
commit682ca04c4032bfbf31e51df2472345fda1ff7b2c (patch)
treeec75a530cd72d30b41f90c2ddbd2878791e3f95f /bgpd/bgp_fsm.c
parent37beff6feb7c1715a19b59b8a87edcb6b50d5ac2 (diff)
bgpd: cleanup, use correct buffer sizes for sockunion2str()
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r--bgpd/bgp_fsm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 813e59ef..d9200457 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -597,8 +597,6 @@ bgp_stop_with_error (struct peer *peer)
static int
bgp_connect_success (struct peer *peer)
{
- char buf1[BUFSIZ];
-
if (peer->fd < 0)
{
zlog_err ("bgp_connect_success peer's fd is negative value %d",
@@ -612,6 +610,8 @@ bgp_connect_success (struct peer *peer)
if (BGP_DEBUG (normal, NORMAL))
{
+ char buf1[SU_ADDRSTRLEN];
+
if (! CHECK_FLAG (peer->sflags, PEER_STATUS_ACCEPT_PEER))
zlog_debug ("%s open active, local address %s", peer->host,
sockunion2str (peer->su_local, buf1, SU_ADDRSTRLEN));