Prior to this fix, the import vrf route-map command only worked
if the route-map existed prior to the command. Additionally, if
the import vrf route-map command was issued without an existing
route-map, the imported prefixes were not removed. This fix
resolves both of thes mis-behaviors. bgp-smoke run with same
failures as base.
Ticket: CM-20459
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-7358
MTYPE_ROUTE_MAP_NAME, rmap_str);
bgp->vpn_policy[afi].rmap[dir] =
route_map_lookup_by_name(rmap_str);
+ if (!bgp->vpn_policy[afi].rmap[dir])
+ return CMD_SUCCESS;
} else {
if (bgp->vpn_policy[afi].rmap_name[dir])
XFREE(MTYPE_ROUTE_MAP_NAME,
XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap_str);
bgp->vpn_policy[afi].rmap[dir] =
route_map_lookup_by_name(rmap_str);
+ if (!bgp->vpn_policy[afi].rmap[dir])
+ return CMD_SUCCESS;
} else {
if (bgp->vpn_policy[afi].rmap_name[dir])
XFREE(MTYPE_ROUTE_MAP_NAME,