summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl/bgpctl.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2020-05-02 14:31:33 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2020-05-02 14:31:33 +0000
commit29e5a10faeed6b5a9131380023dc689c65f829bf (patch)
treef8e615151c9315b6c58ec6cefc271781257d0a79 /usr.sbin/bgpctl/bgpctl.c
parent3caf178da845bbc92ee82b749a9b6d979f9efa4a (diff)
Adjust fmt_attr() to pass in -1 for flags to tell it you don't care
about the flags of the attribute. Part of the JSON output diff. OK job@, benno@, deraadt@
Diffstat (limited to 'usr.sbin/bgpctl/bgpctl.c')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index c4a877f4909..434750c4100 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.260 2020/05/02 14:28:10 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.261 2020/05/02 14:31:32 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -766,7 +766,7 @@ fmt_errstr(u_int8_t errcode, u_int8_t subcode)
}
const char *
-fmt_attr(u_int8_t type, u_int8_t flags)
+fmt_attr(u_int8_t type, int flags)
{
#define CHECK_FLAGS(s, t, m) \
if (((s) & ~(ATTR_DEFMASK | (m))) != (t)) pflags = 1
@@ -845,7 +845,7 @@ fmt_attr(u_int8_t type, u_int8_t flags)
pflags = 1;
break;
}
- if (pflags) {
+ if (flags != -1 && pflags) {
strlcat(cstr, " flags [", sizeof(cstr));
if (flags & ATTR_OPTIONAL)
strlcat(cstr, "O", sizeof(cstr));