mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-15 13:30:21 +00:00
zebra: resolve issue with protocol route-map not applied properly
Problem reported that route-maps applied to "ip protocol table bgp" would not be invoked if the ip protocol table command was issued after the bgp prefixes were installed. Found that a recent change improving how often nexthop_active_update runs missed causing this filtering to be applied. This fix resolves that issue as well as a couple of other places that were problematic with the recent change. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
ee02d389ae
commit
ade4a8868e
@ -2655,7 +2655,6 @@ void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
|
|||||||
{
|
{
|
||||||
struct route_table *table;
|
struct route_table *table;
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
unsigned changed = 0;
|
|
||||||
rib_dest_t *dest;
|
rib_dest_t *dest;
|
||||||
|
|
||||||
if (NULL == (table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id))) {
|
if (NULL == (table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id))) {
|
||||||
@ -2682,7 +2681,6 @@ void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
|
|||||||
* of the rest of the RE.
|
* of the rest of the RE.
|
||||||
*/
|
*/
|
||||||
if (dest->selected_fib) {
|
if (dest->selected_fib) {
|
||||||
changed = 1;
|
|
||||||
if (IS_ZEBRA_DEBUG_RIB) {
|
if (IS_ZEBRA_DEBUG_RIB) {
|
||||||
char buf[PREFIX_STRLEN];
|
char buf[PREFIX_STRLEN];
|
||||||
|
|
||||||
@ -2692,10 +2690,9 @@ void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
|
|||||||
route_entry_dump(&rn->p, NULL, dest->selected_fib);
|
route_entry_dump(&rn->p, NULL, dest->selected_fib);
|
||||||
}
|
}
|
||||||
rib_uninstall(rn, dest->selected_fib);
|
rib_uninstall(rn, dest->selected_fib);
|
||||||
}
|
|
||||||
if (changed)
|
|
||||||
rib_queue_add(rn);
|
rib_queue_add(rn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
|
int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
|
||||||
struct prefix_ipv6 *src_p, struct route_entry *re)
|
struct prefix_ipv6 *src_p, struct route_entry *re)
|
||||||
@ -3069,6 +3066,8 @@ void rib_update_table(struct route_table *table, rib_update_event_t event)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (re->type != ZEBRA_ROUTE_STATIC) {
|
if (re->type != ZEBRA_ROUTE_STATIC) {
|
||||||
|
SET_FLAG(re->status,
|
||||||
|
ROUTE_ENTRY_CHANGED);
|
||||||
rib_queue_add(rn);
|
rib_queue_add(rn);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -3082,9 +3081,12 @@ void rib_update_table(struct route_table *table, rib_update_event_t event)
|
|||||||
* gateway, NHT will
|
* gateway, NHT will
|
||||||
* take care.
|
* take care.
|
||||||
*/
|
*/
|
||||||
if (nh)
|
if (nh) {
|
||||||
|
SET_FLAG(re->status,
|
||||||
|
ROUTE_ENTRY_CHANGED);
|
||||||
rib_queue_add(rn);
|
rib_queue_add(rn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIB_UPDATE_RMAP_CHANGE:
|
case RIB_UPDATE_RMAP_CHANGE:
|
||||||
@ -3093,8 +3095,12 @@ void rib_update_table(struct route_table *table, rib_update_event_t event)
|
|||||||
* protocol in
|
* protocol in
|
||||||
* some cases (TODO).
|
* some cases (TODO).
|
||||||
*/
|
*/
|
||||||
if (rnode_to_ribs(rn))
|
if (rnode_to_ribs(rn)) {
|
||||||
|
RNODE_FOREACH_RE_SAFE (rn, re, next)
|
||||||
|
SET_FLAG(re->status,
|
||||||
|
ROUTE_ENTRY_CHANGED);
|
||||||
rib_queue_add(rn);
|
rib_queue_add(rn);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user