From 90f16743f4462fb3a7fafff847117bf3240eb56f Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 20 Dec 2019 07:17:03 +0000 Subject: Change show_mrt_dump() to call show_rib() instead of the internal show_rib_detail() and show_rib_brief() functions. OK benno@ --- usr.sbin/bgpctl/bgpctl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.sbin/bgpctl/bgpctl.c') diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index d0ad1721937..6d0f5a21d43 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.251 2019/12/19 06:43:51 claudio Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.252 2019/12/20 07:17:02 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -1880,10 +1880,14 @@ void show_mrt_dump(struct mrt_rib *mr, struct mrt_peer *mp, void *arg) { struct ctl_show_rib ctl; + struct parse_result res; struct ctl_show_rib_request *req = arg; struct mrt_rib_entry *mre; u_int16_t i, j; + memset(&res, 0, sizeof(res)); + res.flags = req->flags; + for (i = 0; i < mr->nentries; i++) { mre = &mr->entries[i]; bzero(&ctl, sizeof(ctl)); @@ -1937,14 +1941,13 @@ show_mrt_dump(struct mrt_rib *mr, struct mrt_peer *mp, void *arg) !match_aspath(mre->aspath, mre->aspath_len, &req->as)) continue; + show_rib(&ctl, mre->aspath, mre->aspath_len, &res); if (req->flags & F_CTL_DETAIL) { - show_rib_detail(&ctl, mre->aspath, mre->aspath_len, 0); for (j = 0; j < mre->nattrs; j++) show_attr(mre->attrs[j].attr, mre->attrs[j].attr_len, req->flags); - } else - show_rib_brief(&ctl, mre->aspath, mre->aspath_len); + } } } -- cgit v1.2.3