diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-06-08 20:29:12 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-07-25 00:53:23 -0300 |
| commit | 8d05ef64d8842af9eb91df6c8c4de1e073f99b2e (patch) | |
| tree | 96faacab9fc53907b869635445e927a4fee25100 /zebra/zebra_rnh.c | |
| parent | 8cbeaaa2286b856ec66bc353c43cad882262fff9 (diff) | |
zebra: add new flag to detect nexthop label updates
With the introduction of the pseudowire manager, the NHT tracking code
needs to detect label updates as well.
Create a specific nexthop flag for that. We can't reuse the
RIB_ENTRY_NEXTHOPS_CHANGED flag for this porpose because this flag is
always cleared and reevaluated in rib_process(), setting it outside that
function is a nop.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_rnh.c')
| -rw-r--r-- | zebra/zebra_rnh.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 2a1f69d7b8..ff3b94a25b 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -790,7 +790,10 @@ zebra_rnh_clear_nhc_flag (vrf_id_t vrfid, int family, rnh_type_t type, rib = zebra_rnh_resolve_entry (vrfid, family, type, nrn, rnh, &prn); if (rib) - UNSET_FLAG (rib->status, RIB_ENTRY_NEXTHOPS_CHANGED); + { + UNSET_FLAG (rib->status, RIB_ENTRY_NEXTHOPS_CHANGED); + UNSET_FLAG (rib->status, RIB_ENTRY_LABELS_CHANGED); + } } /* Evaluate all tracked entries (nexthops or routes for import into BGP) @@ -941,7 +944,8 @@ compare_state (struct rib *r1, struct rib *r2) if (r1->nexthop_num != r2->nexthop_num) return 1; - if (CHECK_FLAG(r1->status, RIB_ENTRY_NEXTHOPS_CHANGED)) + if (CHECK_FLAG(r1->status, RIB_ENTRY_NEXTHOPS_CHANGED) || + CHECK_FLAG(r1->status, RIB_ENTRY_LABELS_CHANGED)) return 1; return 0; |
