- route_set_lcommunity would do nothing (and leak memory) if attr->extra
wasn't up yet
- an if() arch in bgp_show_table() was duplicated (with no effect)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
if (! community_list_exact_match (ri->attr->community, list))
continue;
}
- if (type == bgp_show_type_community_all)
- {
- if (! ri->attr->community)
- continue;
- }
if (type == bgp_show_type_lcommunity)
{
struct lcommunity *lcom = output_arg;
else
new = lcommunity_dup (rcs->lcom);
- /* will be interned by caller if required */
- if (attr->extra)
- attr->extra->lcommunity = new;
+ /* will be intern()'d or attr_flush()'d by bgp_update_main() */
+ (bgp_attr_extra_get (attr))->lcommunity = new;
attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES);
}