diff options
Diffstat (limited to 'bgpd/bgp_zebra.c')
| -rw-r--r-- | bgpd/bgp_zebra.c | 265 |
1 files changed, 155 insertions, 110 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 09fe399c29..de25aa30d9 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -64,6 +64,7 @@ #include "bgpd/bgp_evpn_private.h" #include "bgpd/bgp_evpn_mh.h" #include "bgpd/bgp_mac.h" +#include "bgpd/bgp_trace.h" /* All information about zebra. */ struct zclient *zclient = NULL; @@ -112,12 +113,6 @@ static int bgp_read_nexthop_update(ZAPI_CALLBACK_ARGS) return 0; } -static int bgp_read_import_check_update(ZAPI_CALLBACK_ARGS) -{ - bgp_parse_nexthop_update(cmd, vrf_id); - return 0; -} - /* Set or clear interface on which unnumbered neighbor is configured. This * would in turn cause BGP to initiate or turn off IPv6 RAs on this * interface. @@ -141,8 +136,7 @@ static void bgp_update_interface_nbrs(struct bgp *bgp, struct interface *ifp, } } -static int bgp_read_fec_update(int command, struct zclient *zclient, - zebra_size_t length) +static int bgp_read_fec_update(ZAPI_CALLBACK_ARGS) { bgp_parse_fec_update(); return 0; @@ -212,10 +206,11 @@ static int bgp_ifp_destroy(struct interface *ifp) { struct bgp *bgp; - bgp = bgp_lookup_by_vrf_id(ifp->vrf_id); + bgp = ifp->vrf->info; if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("Rx Intf del VRF %u IF %s", ifp->vrf_id, ifp->name); + zlog_debug("Rx Intf del VRF %u IF %s", ifp->vrf->vrf_id, + ifp->name); if (bgp) { bgp_update_interface_nbrs(bgp, ifp, NULL); @@ -234,12 +229,13 @@ static int bgp_ifp_up(struct interface *ifp) struct listnode *node, *nnode; struct bgp *bgp; - bgp = bgp_lookup_by_vrf_id(ifp->vrf_id); + bgp = ifp->vrf->info; bgp_mac_add_mac_entry(ifp); if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("Rx Intf up VRF %u IF %s", ifp->vrf_id, ifp->name); + zlog_debug("Rx Intf up VRF %u IF %s", ifp->vrf->vrf_id, + ifp->name); if (!bgp) return 0; @@ -264,12 +260,13 @@ static int bgp_ifp_down(struct interface *ifp) struct bgp *bgp; struct peer *peer; - bgp = bgp_lookup_by_vrf_id(ifp->vrf_id); + bgp = ifp->vrf->info; bgp_mac_del_mac_entry(ifp); if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("Rx Intf down VRF %u IF %s", ifp->vrf_id, ifp->name); + zlog_debug("Rx Intf down VRF %u IF %s", ifp->vrf->vrf_id, + ifp->name); if (!bgp) return 0; @@ -881,7 +878,7 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote, * It's fine to not have a v6 LL when using * update-source loopback/vrf */ - if (!v6_ll_avail && if_is_loopback_or_vrf(ifp)) + if (!v6_ll_avail && if_is_loopback(ifp)) v6_ll_avail = true; } else /* Link-local address. */ @@ -1255,6 +1252,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, uint8_t distance; struct peer *peer; struct bgp_path_info *mpinfo; + struct bgp *bgp_orig; uint32_t metric; struct attr local_attr; struct bgp_path_info local_info; @@ -1418,13 +1416,13 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, } } + BGP_ORIGINAL_UPDATE(bgp_orig, mpinfo, bgp); + if (nh_family == AF_INET) { nh_updated = update_ipv4nh_for_route_install( - nh_othervrf, - nh_othervrf ? - info->extra->bgp_orig : bgp, - &mpinfo_cp->attr->nexthop, - mpinfo_cp->attr, is_evpn, api_nh); + nh_othervrf, bgp_orig, + &mpinfo_cp->attr->nexthop, mpinfo_cp->attr, + is_evpn, api_nh); } else { ifindex_t ifindex = IFINDEX_INTERNAL; struct in6_addr *nexthop; @@ -1434,18 +1432,13 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, if (!nexthop) nh_updated = update_ipv4nh_for_route_install( - nh_othervrf, - nh_othervrf ? info->extra->bgp_orig - : bgp, + nh_othervrf, bgp_orig, &mpinfo_cp->attr->nexthop, mpinfo_cp->attr, is_evpn, api_nh); else nh_updated = update_ipv6nh_for_route_install( - nh_othervrf, - nh_othervrf ? info->extra->bgp_orig - : bgp, - nexthop, ifindex, mpinfo, info, is_evpn, - api_nh); + nh_othervrf, bgp_orig, nexthop, ifindex, + mpinfo, info, is_evpn, api_nh); } /* Did we get proper nexthop info to update zebra? */ @@ -1495,6 +1488,8 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, if (is_add && CHECK_FLAG(bm->flags, BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA)) { struct bgp_zebra_opaque bzo = {}; + const char *reason = + bgp_path_selection_reason2str(dest->reason); strlcpy(bzo.aspath, info->attr->aspath->str, sizeof(bzo.aspath)); @@ -1508,6 +1503,9 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, strlcpy(bzo.lcommunity, info->attr->lcommunity->str, sizeof(bzo.lcommunity)); + strlcpy(bzo.selection_reason, reason, + sizeof(bzo.selection_reason)); + SET_FLAG(api.message, ZAPI_MESSAGE_OPAQUE); api.opaque.length = MIN(sizeof(struct bgp_zebra_opaque), ZAPI_MESSAGE_OPAQUE_LENGTH); @@ -2530,34 +2528,26 @@ static int bgp_zebra_route_notify_owner(int command, struct zclient *zclient, case ZAPI_ROUTE_INSTALLED: new_select = NULL; /* Clear the flags so that route can be processed */ - if (CHECK_FLAG(dest->flags, - BGP_NODE_FIB_INSTALL_PENDING)) { - UNSET_FLAG(dest->flags, - BGP_NODE_FIB_INSTALL_PENDING); - SET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); - if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("route %pRN : INSTALLED", dest); - /* Find the best route */ - for (pi = dest->info; pi; pi = pi->next) { - /* Process aggregate route */ - bgp_aggregate_increment(bgp, &p, pi, - afi, safi); - if (CHECK_FLAG(pi->flags, - BGP_PATH_SELECTED)) - new_select = pi; - } - /* Advertise the route */ - if (new_select) - group_announce_route(bgp, afi, safi, - dest, new_select); - else { - flog_err(EC_BGP_INVALID_ROUTE, - "selected route %pRN not found", - dest); - - bgp_dest_unlock_node(dest); - return -1; - } + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + SET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); + if (BGP_DEBUG(zebra, ZEBRA)) + zlog_debug("route %pRN : INSTALLED", dest); + /* Find the best route */ + for (pi = dest->info; pi; pi = pi->next) { + /* Process aggregate route */ + bgp_aggregate_increment(bgp, &p, pi, afi, safi); + if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED)) + new_select = pi; + } + /* Advertise the route */ + if (new_select) + group_announce_route(bgp, afi, safi, dest, new_select); + else { + flog_err(EC_BGP_INVALID_ROUTE, + "selected route %pRN not found", dest); + + bgp_dest_unlock_node(dest); + return -1; } break; case ZAPI_ROUTE_REMOVED: @@ -2570,15 +2560,34 @@ static int bgp_zebra_route_notify_owner(int command, struct zclient *zclient, zlog_debug("route %pRN: Removed from Fib", dest); break; case ZAPI_ROUTE_FAIL_INSTALL: + new_select = NULL; if (BGP_DEBUG(zebra, ZEBRA)) zlog_debug("route: %pRN Failed to Install into Fib", dest); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); + for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) { + if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED)) + new_select = pi; + } + if (new_select) + group_announce_route(bgp, afi, safi, dest, new_select); /* Error will be logged by zebra module */ break; case ZAPI_ROUTE_BETTER_ADMIN_WON: if (BGP_DEBUG(zebra, ZEBRA)) zlog_debug("route: %pRN removed due to better admin won", dest); + new_select = NULL; + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); + for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) { + bgp_aggregate_decrement(bgp, &p, pi, afi, safi); + if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED)) + new_select = pi; + } + if (new_select) + group_announce_route(bgp, afi, safi, dest, new_select); /* No action required */ break; case ZAPI_ROUTE_REMOVE_FAIL: @@ -2779,6 +2788,9 @@ static int bgp_zebra_process_local_es_add(ZAPI_CALLBACK_ARGS) esi_to_str(&esi, buf, sizeof(buf)), &originator_ip, active, df_pref, bypass ? "bypass" : ""); + frrtrace(5, frr_bgp, evpn_mh_local_es_add_zrecv, &esi, originator_ip, + active, bypass, df_pref); + bgp_evpn_local_es_add(bgp, &esi, originator_ip, active, df_pref, !!bypass); @@ -2804,6 +2816,8 @@ static int bgp_zebra_process_local_es_del(ZAPI_CALLBACK_ARGS) zlog_debug("Rx del ESI %s", esi_to_str(&esi, buf, sizeof(buf))); + frrtrace(1, frr_bgp, evpn_mh_local_es_del_zrecv, &esi); + bgp_evpn_local_es_del(bgp, &esi); return 0; @@ -2830,10 +2844,15 @@ static int bgp_zebra_process_local_es_evi(ZAPI_CALLBACK_ARGS) ZEBRA_VNI_ADD ? "add" : "del", esi_to_str(&esi, buf, sizeof(buf)), vni); - if (cmd == ZEBRA_LOCAL_ES_EVI_ADD) + if (cmd == ZEBRA_LOCAL_ES_EVI_ADD) { + frrtrace(2, frr_bgp, evpn_mh_local_es_evi_add_zrecv, &esi, vni); + bgp_evpn_local_es_evi_add(bgp, &esi, vni); - else + } else { + frrtrace(2, frr_bgp, evpn_mh_local_es_evi_del_zrecv, &esi, vni); + bgp_evpn_local_es_evi_del(bgp, &esi, vni); + } return 0; } @@ -2868,6 +2887,10 @@ static int bgp_zebra_process_local_l3vni(ZAPI_CALLBACK_ARGS) filter ? "prefix-routes-only" : "none", svi_ifindex); + frrtrace(8, frr_bgp, evpn_local_l3vni_add_zrecv, l3vni, vrf_id, + &svi_rmac, &vrr_rmac, filter, originator_ip, + svi_ifindex, is_anycast_mac); + bgp_evpn_local_l3vni_add(l3vni, vrf_id, &svi_rmac, &vrr_rmac, originator_ip, filter, svi_ifindex, is_anycast_mac); @@ -2876,6 +2899,8 @@ static int bgp_zebra_process_local_l3vni(ZAPI_CALLBACK_ARGS) zlog_debug("Rx L3-VNI DEL VRF %s VNI %u", vrf_id_to_name(vrf_id), l3vni); + frrtrace(2, frr_bgp, evpn_local_l3vni_del_zrecv, l3vni, vrf_id); + bgp_evpn_local_l3vni_del(l3vni, vrf_id); } @@ -2912,13 +2937,19 @@ static int bgp_zebra_process_local_vni(ZAPI_CALLBACK_ARGS) vrf_id_to_name(vrf_id), vni, vrf_id_to_name(tenant_vrf_id), svi_ifindex); - if (cmd == ZEBRA_VNI_ADD) + if (cmd == ZEBRA_VNI_ADD) { + frrtrace(4, frr_bgp, evpn_local_vni_add_zrecv, vni, vtep_ip, + tenant_vrf_id, mcast_grp); + return bgp_evpn_local_vni_add( bgp, vni, vtep_ip.s_addr != INADDR_ANY ? vtep_ip : bgp->router_id, tenant_vrf_id, mcast_grp, svi_ifindex); - else + } else { + frrtrace(1, frr_bgp, evpn_local_vni_del_zrecv, vni); + return bgp_evpn_local_vni_del(bgp, vni); + } } static int bgp_zebra_process_local_macip(ZAPI_CALLBACK_ARGS) @@ -2974,14 +3005,21 @@ static int bgp_zebra_process_local_macip(ZAPI_CALLBACK_ARGS) &mac, &ip, vni, seqnum, state, esi_to_str(&esi, buf2, sizeof(buf2))); - if (cmd == ZEBRA_MACIP_ADD) + if (cmd == ZEBRA_MACIP_ADD) { + frrtrace(6, frr_bgp, evpn_local_macip_add_zrecv, vni, &mac, &ip, + flags, seqnum, &esi); + return bgp_evpn_local_macip_add(bgp, vni, &mac, &ip, flags, seqnum, &esi); - else + } else { + frrtrace(4, frr_bgp, evpn_local_macip_del_zrecv, vni, &mac, &ip, + state); + return bgp_evpn_local_macip_del(bgp, vni, &mac, &ip, state); + } } -static void bgp_zebra_process_local_ip_prefix(ZAPI_CALLBACK_ARGS) +static int bgp_zebra_process_local_ip_prefix(ZAPI_CALLBACK_ARGS) { struct stream *s = NULL; struct bgp *bgp_vrf = NULL; @@ -2993,7 +3031,7 @@ static void bgp_zebra_process_local_ip_prefix(ZAPI_CALLBACK_ARGS) bgp_vrf = bgp_lookup_by_vrf_id(vrf_id); if (!bgp_vrf) - return; + return 0; if (BGP_DEBUG(zebra, ZEBRA)) zlog_debug("Recv prefix %pFX %s on vrf %s", &p, @@ -3017,9 +3055,10 @@ static void bgp_zebra_process_local_ip_prefix(ZAPI_CALLBACK_ARGS) bgp_evpn_withdraw_type5_route(bgp_vrf, &p, AFI_IP6, SAFI_UNICAST); } + return 0; } -static void bgp_zebra_process_label_chunk(ZAPI_CALLBACK_ARGS) +static int bgp_zebra_process_label_chunk(ZAPI_CALLBACK_ARGS) { struct stream *s = NULL; uint8_t response_keep; @@ -3038,12 +3077,12 @@ static void bgp_zebra_process_label_chunk(ZAPI_CALLBACK_ARGS) if (zclient->redist_default != proto) { flog_err(EC_BGP_LM_ERROR, "Got LM msg with wrong proto %u", proto); - return; + return 0; } if (zclient->instance != instance) { flog_err(EC_BGP_LM_ERROR, "Got LM msg with wrong instance %u", proto); - return; + return 0; } if (first > last || @@ -3052,7 +3091,7 @@ static void bgp_zebra_process_label_chunk(ZAPI_CALLBACK_ARGS) flog_err(EC_BGP_LM_ERROR, "%s: Invalid Label chunk: %u - %u", __func__, first, last); - return; + return 0; } if (BGP_DEBUG(zebra, ZEBRA)) { zlog_debug("Label Chunk assign: %u - %u (%u) ", @@ -3061,8 +3100,10 @@ static void bgp_zebra_process_label_chunk(ZAPI_CALLBACK_ARGS) bgp_lp_event_chunk(response_keep, first, last); + return 0; + stream_failure: /* for STREAM_GETX */ - return; + return -1; } extern struct zebra_privs_t bgpd_privs; @@ -3072,9 +3113,10 @@ static int bgp_ifp_create(struct interface *ifp) struct bgp *bgp; if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("Rx Intf add VRF %u IF %s", ifp->vrf_id, ifp->name); + zlog_debug("Rx Intf add VRF %u IF %s", ifp->vrf->vrf_id, + ifp->name); - bgp = bgp_lookup_by_vrf_id(ifp->vrf_id); + bgp = ifp->vrf->info; if (!bgp) return 0; @@ -3085,7 +3127,7 @@ static int bgp_ifp_create(struct interface *ifp) return 0; } -static void bgp_zebra_process_srv6_locator_chunk(ZAPI_CALLBACK_ARGS) +static int bgp_zebra_process_srv6_locator_chunk(ZAPI_CALLBACK_ARGS) { struct stream *s = NULL; struct bgp *bgp = bgp_get_default(); @@ -3100,18 +3142,19 @@ static void bgp_zebra_process_srv6_locator_chunk(ZAPI_CALLBACK_ARGS) if (strcmp(bgp->srv6_locator_name, s6c.locator_name) != 0) { zlog_err("%s: Locator name unmatch %s:%s", __func__, bgp->srv6_locator_name, s6c.locator_name); - return; + return 0; } for (ALL_LIST_ELEMENTS_RO(bgp->srv6_locator_chunks, node, c)) { if (!prefix_cmp(c, &s6c.prefix)) - return; + return 0; } chunk = prefix_ipv6_new(); *chunk = s6c.prefix; listnode_add(bgp->srv6_locator_chunks, chunk); vpn_leak_postchange_all(); + return 0; } static int bgp_zebra_process_srv6_locator_add(ZAPI_CALLBACK_ARGS) @@ -3196,6 +3239,41 @@ static int bgp_zebra_process_srv6_locator_delete(ZAPI_CALLBACK_ARGS) return 0; } +static zclient_handler *const bgp_handlers[] = { + [ZEBRA_ROUTER_ID_UPDATE] = bgp_router_id_update, + [ZEBRA_INTERFACE_ADDRESS_ADD] = bgp_interface_address_add, + [ZEBRA_INTERFACE_ADDRESS_DELETE] = bgp_interface_address_delete, + [ZEBRA_INTERFACE_NBR_ADDRESS_ADD] = bgp_interface_nbr_address_add, + [ZEBRA_INTERFACE_NBR_ADDRESS_DELETE] = bgp_interface_nbr_address_delete, + [ZEBRA_INTERFACE_VRF_UPDATE] = bgp_interface_vrf_update, + [ZEBRA_REDISTRIBUTE_ROUTE_ADD] = zebra_read_route, + [ZEBRA_REDISTRIBUTE_ROUTE_DEL] = zebra_read_route, + [ZEBRA_NEXTHOP_UPDATE] = bgp_read_nexthop_update, + [ZEBRA_FEC_UPDATE] = bgp_read_fec_update, + [ZEBRA_LOCAL_ES_ADD] = bgp_zebra_process_local_es_add, + [ZEBRA_LOCAL_ES_DEL] = bgp_zebra_process_local_es_del, + [ZEBRA_VNI_ADD] = bgp_zebra_process_local_vni, + [ZEBRA_LOCAL_ES_EVI_ADD] = bgp_zebra_process_local_es_evi, + [ZEBRA_LOCAL_ES_EVI_DEL] = bgp_zebra_process_local_es_evi, + [ZEBRA_VNI_DEL] = bgp_zebra_process_local_vni, + [ZEBRA_MACIP_ADD] = bgp_zebra_process_local_macip, + [ZEBRA_MACIP_DEL] = bgp_zebra_process_local_macip, + [ZEBRA_L3VNI_ADD] = bgp_zebra_process_local_l3vni, + [ZEBRA_L3VNI_DEL] = bgp_zebra_process_local_l3vni, + [ZEBRA_IP_PREFIX_ROUTE_ADD] = bgp_zebra_process_local_ip_prefix, + [ZEBRA_IP_PREFIX_ROUTE_DEL] = bgp_zebra_process_local_ip_prefix, + [ZEBRA_GET_LABEL_CHUNK] = bgp_zebra_process_label_chunk, + [ZEBRA_RULE_NOTIFY_OWNER] = rule_notify_owner, + [ZEBRA_IPSET_NOTIFY_OWNER] = ipset_notify_owner, + [ZEBRA_IPSET_ENTRY_NOTIFY_OWNER] = ipset_entry_notify_owner, + [ZEBRA_IPTABLE_NOTIFY_OWNER] = iptable_notify_owner, + [ZEBRA_ROUTE_NOTIFY_OWNER] = bgp_zebra_route_notify_owner, + [ZEBRA_SRV6_LOCATOR_ADD] = bgp_zebra_process_srv6_locator_add, + [ZEBRA_SRV6_LOCATOR_DELETE] = bgp_zebra_process_srv6_locator_delete, + [ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK] = + bgp_zebra_process_srv6_locator_chunk, +}; + void bgp_zebra_init(struct thread_master *master, unsigned short instance) { zclient_num_connects = 0; @@ -3204,44 +3282,11 @@ void bgp_zebra_init(struct thread_master *master, unsigned short instance) bgp_ifp_down, bgp_ifp_destroy); /* Set default values. */ - zclient = zclient_new(master, &zclient_options_default); + zclient = zclient_new(master, &zclient_options_default, bgp_handlers, + array_size(bgp_handlers)); zclient_init(zclient, ZEBRA_ROUTE_BGP, 0, &bgpd_privs); zclient->zebra_connected = bgp_zebra_connected; - zclient->router_id_update = bgp_router_id_update; - zclient->interface_address_add = bgp_interface_address_add; - zclient->interface_address_delete = bgp_interface_address_delete; - zclient->interface_nbr_address_add = bgp_interface_nbr_address_add; - zclient->interface_nbr_address_delete = - bgp_interface_nbr_address_delete; - zclient->interface_vrf_update = bgp_interface_vrf_update; - zclient->redistribute_route_add = zebra_read_route; - zclient->redistribute_route_del = zebra_read_route; - zclient->nexthop_update = bgp_read_nexthop_update; - zclient->import_check_update = bgp_read_import_check_update; - zclient->fec_update = bgp_read_fec_update; - zclient->local_es_add = bgp_zebra_process_local_es_add; - zclient->local_es_del = bgp_zebra_process_local_es_del; - zclient->local_vni_add = bgp_zebra_process_local_vni; - zclient->local_es_evi_add = bgp_zebra_process_local_es_evi; - zclient->local_es_evi_del = bgp_zebra_process_local_es_evi; - zclient->local_vni_del = bgp_zebra_process_local_vni; - zclient->local_macip_add = bgp_zebra_process_local_macip; - zclient->local_macip_del = bgp_zebra_process_local_macip; - zclient->local_l3vni_add = bgp_zebra_process_local_l3vni; - zclient->local_l3vni_del = bgp_zebra_process_local_l3vni; - zclient->local_ip_prefix_add = bgp_zebra_process_local_ip_prefix; - zclient->local_ip_prefix_del = bgp_zebra_process_local_ip_prefix; - zclient->label_chunk = bgp_zebra_process_label_chunk; - zclient->rule_notify_owner = rule_notify_owner; - zclient->ipset_notify_owner = ipset_notify_owner; - zclient->ipset_entry_notify_owner = ipset_entry_notify_owner; - zclient->iptable_notify_owner = iptable_notify_owner; - zclient->route_notify_owner = bgp_zebra_route_notify_owner; zclient->instance = instance; - zclient->srv6_locator_add = bgp_zebra_process_srv6_locator_add; - zclient->srv6_locator_delete = bgp_zebra_process_srv6_locator_delete; - zclient->process_srv6_locator_chunk = - bgp_zebra_process_srv6_locator_chunk; } void bgp_zebra_destroy(void) @@ -3513,7 +3558,7 @@ void bgp_zebra_announce_default(struct bgp *bgp, struct nexthop *nh, /* create default route with interface <VRF> * with nexthop-vrf <VRF> */ - ifp = if_lookup_by_name_all_vrf(vrf->name); + ifp = if_lookup_by_name_vrf(vrf->name, vrf); if (!ifp) return; api_nh->vrf_id = nh->vrf_id; |
