Le Tue, Aug 23, 2022 at 06:28:12PM +0200, Claudio Jeker a écrit : > I noticed that the "connection from non-peer" message can fill the log and > be so chatty that it is hard to see the other messages. The system I see > this on is a bit special since it gets hammered by incorrectly configured > systems. Maybe other people find this message helpful. If so please > speak up now because I think the message does not add much info and should > be skipped unless verbose logging is used. >
I agree with this change (I also have a log full of this message). > -- > :wq Claudio > > Index: logmsg.c > =================================================================== > RCS file: /cvs/src/usr.sbin/bgpd/logmsg.c,v > retrieving revision 1.8 > diff -u -p -r1.8 logmsg.c > --- logmsg.c 28 Jul 2022 13:11:48 -0000 1.8 > +++ logmsg.c 23 Aug 2022 14:38:42 -0000 > @@ -213,11 +213,11 @@ void > log_conn_attempt(const struct peer *peer, struct sockaddr *sa, socklen_t len) > { > char *p; > - const char *b; > > if (peer == NULL) { /* connection from non-peer, drop */ > - b = log_sockaddr(sa, len); > - logit(LOG_INFO, "connection from non-peer %s refused", b); > + if (log_getverbose()) > + logit(LOG_INFO, "connection from non-peer %s refused", > + log_sockaddr(sa, len)); > } else { > /* only log if there is a chance that the session may come up */ > if (peer->conf.down && peer->state == STATE_IDLE) >