aspath_refs is gone, adjust code
authorclaudio <claudio@openbsd.org>
Mon, 29 Aug 2022 18:19:21 +0000 (18:19 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 29 Aug 2022 18:19:21 +0000 (18:19 +0000)
usr.sbin/bgpctl/output.c
usr.sbin/bgpctl/output_json.c

index b5fadec..5483584 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: output.c,v 1.27 2022/08/29 14:58:15 claudio Exp $ */
+/*     $OpenBSD: output.c,v 1.28 2022/08/29 18:19:21 claudio Exp $ */
 
 /*
  * Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -1003,9 +1003,7 @@ show_rib_mem(struct rde_memstats *stats)
        printf("\t   and holding %lld references\n",
            stats->path_refs);
        printf("%10lld BGP AS-PATH attribute entries using "
-           "%s of memory\n\t   and holding %lld references\n",
-           stats->aspath_cnt, fmt_mem(stats->aspath_size),
-           stats->aspath_refs);
+           "%s of memory\n", stats->aspath_cnt, fmt_mem(stats->aspath_size));
        printf("%10lld entries for %lld BGP communities "
            "using %s of memory\n", stats->comm_cnt, stats->comm_nmemb,
            fmt_mem(stats->comm_cnt * sizeof(struct rde_community) +
index e960da9..3ed9f94 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: output_json.c,v 1.21 2022/08/29 14:58:15 claudio Exp $ */
+/*     $OpenBSD: output_json.c,v 1.22 2022/08/29 18:19:21 claudio Exp $ */
 
 /*
  * Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
@@ -936,7 +936,7 @@ json_rib_mem(struct rde_memstats *stats)
            stats->path_cnt * sizeof(struct rde_aspath),
            stats->path_refs);
        json_rib_mem_element("aspath", stats->aspath_cnt,
-           stats->aspath_size, stats->aspath_refs);
+           stats->aspath_size, UINT64_MAX);
        json_rib_mem_element("community_entries", stats->comm_cnt,
            stats->comm_cnt * sizeof(struct rde_community), UINT64_MAX);
        json_rib_mem_element("community", stats->comm_nmemb,