From 1117306f0553d663e1d3cc5c2da7c0a95f9d5659 Mon Sep 17 00:00:00 2001 From: phessler Date: Fri, 19 Jun 2015 14:54:12 +0000 Subject: [PATCH] show the number of (currently) known prefixes and the max-prefix limit, when we terminate the session. since we terminate the session as soon as we go above the limit, show '>' since there may be more that we haven't/won't process. OK benno@ --- usr.sbin/bgpd/rde.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 8624461f803..fea40aef92a 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.330 2015/03/14 03:52:42 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.331 2015/06/19 14:54:12 phessler Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -1124,7 +1124,8 @@ rde_update_dispatch(struct imsg *imsg) /* max prefix checker */ if (peer->conf.max_prefix && peer->prefix_cnt >= peer->conf.max_prefix) { - log_peer_warnx(&peer->conf, "prefix limit reached"); + log_peer_warnx(&peer->conf, "prefix limit reached" + " (>%u/%u)", peer->prefix_cnt, peer->conf.max_prefix); rde_update_err(peer, ERR_CEASE, ERR_CEASE_MAX_PREFIX, NULL, 0); goto done; @@ -1206,7 +1207,9 @@ rde_update_dispatch(struct imsg *imsg) if (peer->conf.max_prefix && peer->prefix_cnt >= peer->conf.max_prefix) { log_peer_warnx(&peer->conf, - "prefix limit reached"); + "prefix limit reached" + " (>%u/%u)", peer->prefix_cnt, + peer->conf.max_prefix); rde_update_err(peer, ERR_CEASE, ERR_CEASE_MAX_PREFIX, NULL, 0); goto done; @@ -1242,7 +1245,9 @@ rde_update_dispatch(struct imsg *imsg) if (peer->conf.max_prefix && peer->prefix_cnt >= peer->conf.max_prefix) { log_peer_warnx(&peer->conf, - "prefix limit reached"); + "prefix limit reached" + " (>%u/%u)", peer->prefix_cnt, + peer->conf.max_prefix); rde_update_err(peer, ERR_CEASE, ERR_CEASE_MAX_PREFIX, NULL, 0); goto done; -- 2.20.1