diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-09 13:44:25 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-10 11:04:03 +0200 |
| commit | 1bcf3a96de9923af1ab6c95d4f59f90374015336 (patch) | |
| tree | 9c2ad0eaf24972c06001a9d6a327f01e7aafb78b /bgpd/bgp_mpath.c | |
| parent | eae63cb501ad3eb293ad559b00934261defcfe11 (diff) | |
bgpd: Use get/set helpers for attr->lcommunity
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_mpath.c')
| -rw-r--r-- | bgpd/bgp_mpath.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 3b92416c96..774953f6f8 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -846,8 +846,9 @@ void bgp_path_info_mpath_aggregate_update(struct bgp_path_info *new_best, ecomm = (bgp_attr_get_ecommunity(&attr)) ? ecommunity_dup(bgp_attr_get_ecommunity(&attr)) : NULL; - lcomm = (attr.lcommunity) ? lcommunity_dup(attr.lcommunity) - : NULL; + lcomm = (bgp_attr_get_lcommunity(&attr)) + ? lcommunity_dup(bgp_attr_get_lcommunity(&attr)) + : NULL; for (mpinfo = bgp_path_info_mpath_first(new_best); mpinfo; mpinfo = bgp_path_info_mpath_next(mpinfo)) { @@ -884,16 +885,17 @@ void bgp_path_info_mpath_aggregate_update(struct bgp_path_info *new_best, bgp_attr_get_ecommunity( mpinfo->attr)); } - if (mpinfo->attr->lcommunity) { + if (bgp_attr_get_lcommunity(mpinfo->attr)) { if (lcomm) { lcommerge = lcommunity_merge( - lcomm, - mpinfo->attr->lcommunity); + lcomm, bgp_attr_get_lcommunity( + mpinfo->attr)); lcomm = lcommunity_uniq_sort(lcommerge); lcommunity_free(&lcommerge); } else lcomm = lcommunity_dup( - mpinfo->attr->lcommunity); + bgp_attr_get_lcommunity( + mpinfo->attr)); } } @@ -908,7 +910,7 @@ void bgp_path_info_mpath_aggregate_update(struct bgp_path_info *new_best, attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES); } if (lcomm) { - attr.lcommunity = lcomm; + bgp_attr_set_lcommunity(&attr, lcomm); attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES); } |
