summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-12-03 19:20:36 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-12-03 19:20:36 +0000
commit34cc73ade3eedfef48dcf21820326c88b840c17c (patch)
tree174f83e00736cb0a70104d29425c3bb4ef298ae1 /usr.sbin
parent26227586ccb37bb640ffc4f49adb343677574208 (diff)
Only log if there is a chance that the session may come up if the neighbor
is administrativly down save the electrons for more important messages. After a short discussion with Elisa Jasinska from ams-ix. OK henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index e2708cbc95d..4bb061fadec 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.52 2009/12/01 14:28:05 claudio Exp $ */
+/* $OpenBSD: log.c,v 1.53 2009/12/03 19:20:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -327,6 +327,9 @@ log_conn_attempt(const struct peer *peer, struct sockaddr *sa)
b = log_sockaddr(sa);
logit(LOG_INFO, "connection from non-peer %s refused", b);
} else {
+ /* only log if there is a chance that the session may come up */
+ if (peer->conf.down && peer->state == STATE_IDLE)
+ return;
p = log_fmt_peer(&peer->conf);
logit(LOG_INFO, "Connection attempt from %s while session is "
"in state %s", p, statenames[peer->state]);