summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl/bgpctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpctl/bgpctl.c')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 954abd7e87e..02fc5ab0535 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.265 2021/02/16 08:30:21 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.266 2021/04/15 14:12:05 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -466,7 +466,7 @@ show(struct imsg *imsg, struct parse_result *res)
warnx("bad IMSG_CTL_SHOW_RIB_ATTR received");
break;
}
- output->attr(imsg->data, ilen, res);
+ output->attr(imsg->data, ilen, res->flags);
break;
case IMSG_CTL_SHOW_RIB_MEM:
if (imsg->hdr.len < IMSG_HEADER_SIZE + sizeof(stats))
@@ -1181,7 +1181,7 @@ show_mrt_dump(struct mrt_rib *mr, struct mrt_peer *mp, void *arg)
if (req->flags & F_CTL_DETAIL) {
for (j = 0; j < mre->nattrs; j++)
output->attr(mre->attrs[j].attr,
- mre->attrs[j].attr_len, &res);
+ mre->attrs[j].attr_len, req->flags);
}
}
}
@@ -1565,7 +1565,7 @@ show_mrt_notification(u_char *p, u_int16_t len)
/* XXX this function does not handle JSON output */
static void
-show_mrt_update(u_char *p, u_int16_t len)
+show_mrt_update(u_char *p, u_int16_t len, int reqflags)
{
struct bgpd_addr prefix;
int pos;
@@ -1634,7 +1634,7 @@ show_mrt_update(u_char *p, u_int16_t len)
attrlen += 1 + 2;
}
- output->attr(p, attrlen, 0);
+ output->attr(p, attrlen, reqflags);
p += attrlen;
alen -= attrlen;
len -= attrlen;
@@ -1664,6 +1664,7 @@ show_mrt_msg(struct mrt_bgp_msg *mm, void *arg)
u_char *p;
u_int16_t len;
u_int8_t type;
+ struct ctl_show_rib_request *req = arg;
printf("%s %s[%u] -> ", fmt_time(&mm->time),
log_addr(&mm->src), mm->src_as);
@@ -1717,7 +1718,7 @@ show_mrt_msg(struct mrt_bgp_msg *mm, void *arg)
printf("illegal length: %u byte\n", len);
return;
}
- show_mrt_update(p, len - MSGSIZE_HEADER);
+ show_mrt_update(p, len - MSGSIZE_HEADER, req->flags);
break;
case KEEPALIVE:
printf("%s ", msgtypenames[type]);