mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 12:48:53 +00:00
bgpd: lcommunity: fix minor issues
- 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>
This commit is contained in:
parent
2acb4ac250
commit
ed165abf90
@ -7426,11 +7426,6 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
|
|||||||
if (! community_list_exact_match (ri->attr->community, list))
|
if (! community_list_exact_match (ri->attr->community, list))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (type == bgp_show_type_community_all)
|
|
||||||
{
|
|
||||||
if (! ri->attr->community)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (type == bgp_show_type_lcommunity)
|
if (type == bgp_show_type_lcommunity)
|
||||||
{
|
{
|
||||||
struct lcommunity *lcom = output_arg;
|
struct lcommunity *lcom = output_arg;
|
||||||
|
@ -1676,9 +1676,8 @@ route_set_lcommunity (void *rule, struct prefix *prefix,
|
|||||||
else
|
else
|
||||||
new = lcommunity_dup (rcs->lcom);
|
new = lcommunity_dup (rcs->lcom);
|
||||||
|
|
||||||
/* will be interned by caller if required */
|
/* will be intern()'d or attr_flush()'d by bgp_update_main() */
|
||||||
if (attr->extra)
|
(bgp_attr_extra_get (attr))->lcommunity = new;
|
||||||
attr->extra->lcommunity = new;
|
|
||||||
|
|
||||||
attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES);
|
attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user