Adjust to renaming of F_CTL_ACTIVE/F_PREF_ACTIVE to F_CTL_ACTIVE/F_PREF_BEST
authorclaudio <claudio@openbsd.org>
Mon, 21 Mar 2022 10:16:23 +0000 (10:16 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 21 Mar 2022 10:16:23 +0000 (10:16 +0000)
OK tb@

usr.sbin/bgpctl/bgpctl.c
usr.sbin/bgpctl/output_json.c
usr.sbin/bgpctl/parser.c

index b5896ae..6b2d4bf 100644 (file)
@@ -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 <henning@openbsd.org>
@@ -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));
index 4fba523..1e0e906 100644 (file)
@@ -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 <claudio@openbsd.org>
@@ -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");
index bf0b6c0..b80bf42 100644 (file)
@@ -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 <henning@openbsd.org>
@@ -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},