diff options
Diffstat (limited to 'zebra/zebra_rnh.c')
| -rw-r--r-- | zebra/zebra_rnh.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 9b1c978ef7..380d06522b 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -266,6 +266,7 @@ zebra_evaluate_rnh_table (int vrfid, int family, int force) char bufs[INET6_ADDRSTRLEN]; struct route_node *static_rn; struct nexthop *nexthop; + ntable = lookup_rnh_table(vrfid, family); if (!ntable) { @@ -312,7 +313,21 @@ zebra_evaluate_rnh_table (int vrfid, int family, int force) state_changed = 0; - if (compare_state(rib, rnh->state)) + /* Ensure prefixes we're resolving over have stayed the same */ + if (!prefix_same(&rnh->resolved_route, &prn->p)) + { + if (rib) + UNSET_FLAG(rib->status, RIB_ENTRY_NEXTHOPS_CHANGED); + + if (prn) + prefix_copy(&rnh->resolved_route, &prn->p); + else + memset(&rnh->resolved_route, 0, sizeof(struct prefix)); + + copy_state(rnh, rib, nrn); + state_changed = 1; + } + else if (compare_state(rib, rnh->state)) { if (rib) UNSET_FLAG(rib->status, RIB_ENTRY_NEXTHOPS_CHANGED); |
