/* For network route-map updates. */
for (bn = bgp_table_top(bgp->route[afi][safi]); bn;
- bn = bgp_route_next(bn))
- if ((bgp_static = bn->info) != NULL) {
- if (bgp_static->rmap.name
- && (strcmp(rmap_name, bgp_static->rmap.name)
- == 0)) {
- bgp_static->rmap.map = map;
-
- if (route_update)
- if (!bgp_static->backdoor) {
- if (bgp_debug_zebra(
- &bn->p))
- zlog_debug(
- "Processing route_map %s update on "
- "static route %s",
- rmap_name,
- inet_ntop(
- bn->p.family,
- &bn->p.u.prefix,
- buf,
- INET6_ADDRSTRLEN));
- bgp_static_update(
- bgp, &bn->p,
- bgp_static, afi,
- safi);
- }
- }
+ bn = bgp_route_next(bn)) {
+ bgp_static = bgp_node_get_bgp_static_info(bn);
+ if (!bgp_static)
+ continue;
+
+ if (!bgp_static->rmap.name
+ || (strcmp(rmap_name, bgp_static->rmap.name) != 0))
+ continue;
+
+ bgp_static->rmap.map = map;
+
+ if (route_update && !bgp_static->backdoor) {
+ if (bgp_debug_zebra(&bn->p))
+ zlog_debug(
+ "Processing route_map %s update on static route %s",
+ rmap_name,
+ inet_ntop(bn->p.family,
+ &bn->p.u.prefix, buf,
+ INET6_ADDRSTRLEN));
+ bgp_static_update(bgp, &bn->p, bgp_static, afi,
+ safi);
}
+ }
}
/* For redistribute route-map updates. */
continue;
for (ALL_LIST_ELEMENTS_RO(red_list, node, red)) {
- if (red->rmap.name
- && (strcmp(rmap_name, red->rmap.name)
- == 0)) {
- red->rmap.map = map;
-
- if (route_update) {
- if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug(
- "Processing route_map %s update on "
- "redistributed routes",
- rmap_name);
-
- bgp_redistribute_resend(
- bgp, afi, i,
+ if (!red->rmap.name
+ || (strcmp(rmap_name, red->rmap.name) != 0))
+ continue;
+
+ red->rmap.map = map;
+
+ if (!route_update)
+ continue;
+
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug(
+ "Processing route_map %s update on redistributed routes",
+ rmap_name);
+
+ bgp_redistribute_resend(bgp, afi, i,
red->instance);
- }
- }
}
}
/* for type5 command route-maps */
FOREACH_AFI_SAFI (afi, safi) {
- if (bgp->adv_cmd_rmap[afi][safi].name
- && strcmp(rmap_name, bgp->adv_cmd_rmap[afi][safi].name)
- == 0) {
- if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug(
- "Processing route_map %s update on advertise type5 route command",
- rmap_name);
- bgp_evpn_withdraw_type5_routes(bgp, afi, safi);
- bgp_evpn_advertise_type5_routes(bgp, afi, safi);
- }
+ if (!bgp->adv_cmd_rmap[afi][safi].name
+ || strcmp(rmap_name, bgp->adv_cmd_rmap[afi][safi].name)
+ != 0)
+ continue;
+
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug(
+ "Processing route_map %s update on advertise type5 route command",
+ rmap_name);
+ bgp_evpn_withdraw_type5_routes(bgp, afi, safi);
+ bgp_evpn_advertise_type5_routes(bgp, afi, safi);
}
}
"community", NULL);
}
+ALIAS (no_set_community,
+ no_set_community_short_cmd,
+ "no set community",
+ NO_STR
+ SET_STR
+ "BGP community attribute\n")
+
DEFUN (set_community_delete,
set_community_delete_cmd,
"large-community", NULL);
}
+ALIAS (no_set_lcommunity1,
+ no_set_lcommunity1_short_cmd,
+ "no set large-community",
+ NO_STR
+ SET_STR
+ "BGP large community attribute\n")
+
DEFUN (set_lcommunity_delete,
set_lcommunity_delete_cmd,
"set large-comm-list <(1-99)|(100-500)|WORD> delete",
"large-comm-list", NULL);
}
+ALIAS (no_set_lcommunity_delete,
+ no_set_lcommunity_delete_short_cmd,
+ "no set large-comm-list",
+ NO_STR
+ SET_STR
+ "set BGP large community list (for deletion)\n")
+
DEFUN (set_ecommunity_rt,
set_ecommunity_rt_cmd,
"set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN...",
"extcommunity rt", NULL);
}
+ALIAS (no_set_ecommunity_rt,
+ no_set_ecommunity_rt_short_cmd,
+ "no set extcommunity rt",
+ NO_STR
+ SET_STR
+ "BGP extended community attribute\n"
+ "Route Target extended community\n")
DEFUN (set_ecommunity_soo,
set_ecommunity_soo_cmd,
"extcommunity soo", NULL);
}
+ALIAS (no_set_ecommunity_soo,
+ no_set_ecommunity_soo_short_cmd,
+ "no set extcommunity soo",
+ NO_STR
+ SET_STR
+ "GP extended community attribute\n"
+ "Site-of-Origin extended community\n")
DEFUN (set_origin,
set_origin_cmd,
install_element(RMAP_NODE, &set_community_cmd);
install_element(RMAP_NODE, &set_community_none_cmd);
install_element(RMAP_NODE, &no_set_community_cmd);
+ install_element(RMAP_NODE, &no_set_community_short_cmd);
install_element(RMAP_NODE, &set_community_delete_cmd);
install_element(RMAP_NODE, &no_set_community_delete_cmd);
install_element(RMAP_NODE, &set_lcommunity_cmd);
install_element(RMAP_NODE, &set_lcommunity_none_cmd);
install_element(RMAP_NODE, &no_set_lcommunity_cmd);
install_element(RMAP_NODE, &no_set_lcommunity1_cmd);
+ install_element(RMAP_NODE, &no_set_lcommunity1_short_cmd);
install_element(RMAP_NODE, &set_lcommunity_delete_cmd);
install_element(RMAP_NODE, &no_set_lcommunity_delete_cmd);
+ install_element(RMAP_NODE, &no_set_lcommunity_delete_short_cmd);
install_element(RMAP_NODE, &set_ecommunity_rt_cmd);
install_element(RMAP_NODE, &no_set_ecommunity_rt_cmd);
+ install_element(RMAP_NODE, &no_set_ecommunity_rt_short_cmd);
install_element(RMAP_NODE, &set_ecommunity_soo_cmd);
install_element(RMAP_NODE, &no_set_ecommunity_soo_cmd);
+ install_element(RMAP_NODE, &no_set_ecommunity_soo_short_cmd);
#ifdef KEEP_OLD_VPN_COMMANDS
install_element(RMAP_NODE, &set_vpn_nexthop_cmd);
install_element(RMAP_NODE, &no_set_vpn_nexthop_cmd);