summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c5
-rw-r--r--bgpd/bgp_routemap.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index afcf05d2b3..06584cf681 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -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))
continue;
}
- if (type == bgp_show_type_community_all)
- {
- if (! ri->attr->community)
- continue;
- }
if (type == bgp_show_type_lcommunity)
{
struct lcommunity *lcom = output_arg;
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 58d9b20f90..a3c61e2155 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -1676,9 +1676,8 @@ route_set_lcommunity (void *rule, struct prefix *prefix,
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);
}