summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2022-08-29 14:57:28 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2022-08-29 14:57:28 +0000
commitf8f517d8351a190ed941ee030f3a5d5458474869 (patch)
treee14876bbd3c046a3c9b1001d496e029167cc8053
parent2c5260ab167e7aef25c13670be2111a0b16a365d (diff)
Export pending update and withdraw as part of struct peer_stats.
OK tb@
-rw-r--r--usr.sbin/bgpd/rde.c4
-rw-r--r--usr.sbin/bgpd/session.h4
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 <henning@openbsd.org>
@@ -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 <henning@openbsd.org>
@@ -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;