Re: bgpd logging nexthop valid

2016-06-20 Thread Peter Hessler
On 2016 Jun 19 (Sun) at 17:39:53 +0200 (+0200), Sebastian Benoit wrote:
:i would like to make bgpd a bit more quiet.
:
:This type of message
:
: bgpd[59424]: nexthop 1.2.3.4 now valid: via 192.168.0.1
:
:happens quite often depending on your upstreams. This makes it a debug
:message only.
:
:ok?
:

YES YES YES YES YES

ahem.  "OK"


:diff --git usr.sbin/bgpd/bgpd.c usr.sbin/bgpd/bgpd.c
:index 8e0031e..8925086 100644
:--- usr.sbin/bgpd/bgpd.c
:+++ usr.sbin/bgpd/bgpd.c
:@@ -771,7 +771,7 @@ send_nexthop_update(struct kroute_nexthop *msg)
:   quit = 1;
:   }
: 
:-  log_info("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
:+  log_debug("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
:   msg->valid ? "valid" : "invalid",
:   msg->connected ? ": directly connected" : "",
:   msg->gateway.aid ? gw : "");
:

-- 
Documentation is the castor oil of programming.  Managers know it must
be good because the programmers hate it so much.



Re: bgpd logging nexthop valid

2016-06-20 Thread Stefan Sperling
On Sun, Jun 19, 2016 at 05:39:53PM +0200, Sebastian Benoit wrote:
> i would like to make bgpd a bit more quiet.
> 
> This type of message
> 
>  bgpd[59424]: nexthop 1.2.3.4 now valid: via 192.168.0.1
> 
> happens quite often depending on your upstreams. This makes it a debug
> message only.
> 
> ok?

Looks fine to me. I don't run bgpd, but this looks like a normal
operational event and not worth logging by default.

> diff --git usr.sbin/bgpd/bgpd.c usr.sbin/bgpd/bgpd.c
> index 8e0031e..8925086 100644
> --- usr.sbin/bgpd/bgpd.c
> +++ usr.sbin/bgpd/bgpd.c
> @@ -771,7 +771,7 @@ send_nexthop_update(struct kroute_nexthop *msg)
>   quit = 1;
>   }
>  
> - log_info("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
> + log_debug("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
>   msg->valid ? "valid" : "invalid",
>   msg->connected ? ": directly connected" : "",
>   msg->gateway.aid ? gw : "");
> 



bgpd logging nexthop valid

2016-06-19 Thread Sebastian Benoit
i would like to make bgpd a bit more quiet.

This type of message

 bgpd[59424]: nexthop 1.2.3.4 now valid: via 192.168.0.1

happens quite often depending on your upstreams. This makes it a debug
message only.

ok?

diff --git usr.sbin/bgpd/bgpd.c usr.sbin/bgpd/bgpd.c
index 8e0031e..8925086 100644
--- usr.sbin/bgpd/bgpd.c
+++ usr.sbin/bgpd/bgpd.c
@@ -771,7 +771,7 @@ send_nexthop_update(struct kroute_nexthop *msg)
quit = 1;
}
 
-   log_info("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
+   log_debug("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
msg->valid ? "valid" : "invalid",
msg->connected ? ": directly connected" : "",
msg->gateway.aid ? gw : "");