From 4d242bdfb59e5151d2116fb7a13057e6962e8c70 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 29 Aug 2022 14:57:27 +0000 Subject: [PATCH] Export pending update and withdraw as part of struct peer_stats. OK tb@ --- usr.sbin/bgpd/rde.c | 4 +++- usr.sbin/bgpd/session.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index febdc17fa5e..10f86a8997b 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.565 2022/08/26 14:10:52 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.566 2022/08/29 14:57:27 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -623,6 +623,8 @@ badnetdel: peer->prefix_sent_withdraw; p.stats.prefix_sent_eor = peer->prefix_sent_eor; + p.stats.pending_update = peer->up_nlricnt; + p.stats.pending_withdraw = peer->up_wcnt; } imsg_compose(ibuf_se_ctl, IMSG_CTL_SHOW_NEIGHBOR, 0, imsg.hdr.pid, -1, &p, sizeof(struct peer)); diff --git a/usr.sbin/bgpd/session.h b/usr.sbin/bgpd/session.h index 68573f287ea..fbc9181cbb6 100644 --- a/usr.sbin/bgpd/session.h +++ b/usr.sbin/bgpd/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.157 2022/07/28 13:11:51 deraadt Exp $ */ +/* $OpenBSD: session.h,v 1.158 2022/08/29 14:57:27 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -179,6 +179,8 @@ struct peer_stats { time_t last_write; uint32_t prefix_cnt; uint32_t prefix_out_cnt; + uint32_t pending_update; + uint32_t pending_withdraw; uint8_t last_sent_errcode; uint8_t last_sent_suberr; uint8_t last_rcvd_errcode; -- 2.20.1