summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-11-02 18:35:20 +0100
committerDonald Sharp <sharpd@nvidia.com>2020-11-15 15:44:47 +0100
commit779fee9303e24223711c27065f000faa629dc9fa (patch)
treea901953dc30f2bdc8102b2fb2bf1c7bdf9ddf389 /bgpd/bgp_debug.c
parentbgpd: Convert attr->transit to use accessor functions (diff)
downloadfrr-779fee9303e24223711c27065f000faa629dc9fa.tar.xz
frr-779fee9303e24223711c27065f000faa629dc9fa.zip
bgpd: Abstract attr->cluster to accessor/set functions
Abstract the access of `attr->cluster` to appropriate accessor/set functionality. Future commits will allow us to move this data around to make `struct attr` smaller. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 811634e8e..2c076fb80 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -429,13 +429,16 @@ bool bgp_dump_attr(struct attr *attr, char *buf, size_t size)
", originator %pI4", &attr->originator_id);
if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_CLUSTER_LIST))) {
+ struct cluster_list *cluster;
int i;
snprintf(buf + strlen(buf), size - strlen(buf),
", clusterlist");
- for (i = 0; i < attr->cluster->length / 4; i++)
+
+ cluster = bgp_attr_get_cluster(attr);
+ for (i = 0; i < cluster->length / 4; i++)
snprintfrr(buf + strlen(buf), size - strlen(buf),
- " %pI4", &attr->cluster->list[i]);
+ " %pI4", &cluster->list[i]);
}
if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL)))