From 4ff57d1d979c5e72ffbed173ca64dd952e12d1c9 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 21 Mar 2022 10:16:23 +0000 Subject: [PATCH] Adjust to renaming of F_CTL_ACTIVE/F_PREF_ACTIVE to F_CTL_ACTIVE/F_PREF_BEST OK tb@ --- usr.sbin/bgpctl/bgpctl.c | 6 +++--- usr.sbin/bgpctl/output_json.c | 4 ++-- usr.sbin/bgpctl/parser.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index b5896ae6866..6b2d4bfa659 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.275 2022/02/06 09:52:32 claudio Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.276 2022/03/21 10:16:23 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -697,7 +697,7 @@ fmt_flags(uint8_t flags, int sum) *p++ = 'S'; if (flags & F_PREF_ELIGIBLE) *p++ = '*'; - if (flags & F_PREF_ACTIVE) + if (flags & F_PREF_BEST) *p++ = '>'; *p = '\0'; snprintf(buf, sizeof(buf), "%-5s", flagstr); @@ -711,7 +711,7 @@ fmt_flags(uint8_t flags, int sum) strlcat(buf, ", stale", sizeof(buf)); if (flags & F_PREF_ELIGIBLE) strlcat(buf, ", valid", sizeof(buf)); - if (flags & F_PREF_ACTIVE) + if (flags & F_PREF_BEST) strlcat(buf, ", best", sizeof(buf)); if (flags & F_PREF_ANNOUNCE) strlcat(buf, ", announced", sizeof(buf)); diff --git a/usr.sbin/bgpctl/output_json.c b/usr.sbin/bgpctl/output_json.c index 4fba5234892..1e0e906af9a 100644 --- a/usr.sbin/bgpctl/output_json.c +++ b/usr.sbin/bgpctl/output_json.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output_json.c,v 1.13 2022/02/06 09:52:32 claudio Exp $ */ +/* $OpenBSD: output_json.c,v 1.14 2022/03/21 10:16:23 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker @@ -875,7 +875,7 @@ json_rib(struct ctl_show_rib *r, u_char *asdata, size_t aslen, /* flags */ json_do_bool("valid", r->flags & F_PREF_ELIGIBLE); - if (r->flags & F_PREF_ACTIVE) + if (r->flags & F_PREF_BEST) json_do_bool("best", 1); if (r->flags & F_PREF_INTERNAL) json_do_printf("source", "%s", "internal"); diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index bf0b6c01a6c..b80bf424e31 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.108 2022/02/06 09:52:32 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.109 2022/03/21 10:16:23 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -172,8 +172,8 @@ static const struct token t_show_rib[] = { { KEYWORD, "community", NONE, t_show_community}, { KEYWORD, "ext-community", NONE, t_show_extcommunity}, { KEYWORD, "large-community", NONE, t_show_largecommunity}, - { FLAG, "best", F_CTL_ACTIVE, t_show_rib}, - { FLAG, "selected", F_CTL_ACTIVE, t_show_rib}, + { FLAG, "best", F_CTL_BEST, t_show_rib}, + { FLAG, "selected", F_CTL_BEST, t_show_rib}, { FLAG, "detail", F_CTL_DETAIL, t_show_rib}, { FLAG, "error", F_CTL_INVALID, t_show_rib}, { FLAG, "ssv" , F_CTL_SSV, t_show_rib}, -- 2.20.1