diff options
author | claudio <claudio@openbsd.org> | 2019-12-20 07:17:02 +0000 |
---|---|---|
committer | claudio <claudio@openbsd.org> | 2019-12-20 07:17:02 +0000 |
commit | a069aa25ff12a228cdf7f6ae0e25c99f549816c1 (patch) | |
tree | d730740c3f4fc392950f5edb417d751461616acf /usr.sbin/bgpctl | |
parent | don't need this directory either (diff) | |
download | wireguard-openbsd-a069aa25ff12a228cdf7f6ae0e25c99f549816c1.tar.xz wireguard-openbsd-a069aa25ff12a228cdf7f6ae0e25c99f549816c1.zip |
Change show_mrt_dump() to call show_rib() instead of the internal
show_rib_detail() and show_rib_brief() functions.
OK benno@
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 <henning@openbsd.org> @@ -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); + } } } |