mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 01:14:48 +00:00
Multiple redistribute commands with different metric fail
Ticket: CM-7339 Reviewed-by: CCR-3446 Testing: Test Suite passes now The bgp_redistribute_metric_set function was not taking into account the table # for deciding what metric to set.
This commit is contained in:
parent
495f0b13e1
commit
382440244a
@ -1621,7 +1621,8 @@ bgp_redistribute_metric_set (struct bgp *bgp, struct bgp_redist *red, afi_t afi,
|
||||
|
||||
for (rn = bgp_table_top(bgp->rib[afi][SAFI_UNICAST]); rn; rn = bgp_route_next(rn)) {
|
||||
for (ri = rn->info; ri; ri = ri->next) {
|
||||
if (ri->sub_type == BGP_ROUTE_REDISTRIBUTE && ri->type == type) {
|
||||
if (ri->sub_type == BGP_ROUTE_REDISTRIBUTE && ri->type == type &&
|
||||
ri->instance == red->instance) {
|
||||
ri->attr->med = red->redist_metric;
|
||||
bgp_info_set_flag(rn, ri, BGP_INFO_ATTR_CHANGED);
|
||||
bgp_process(bgp, rn, afi, SAFI_UNICAST);
|
||||
|
Loading…
Reference in New Issue
Block a user