summaryrefslogtreecommitdiff
path: root/proto/ospf/topology.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-07-09 14:53:15 +0200
committerMaria Matejka <mq@ucw.cz>2019-07-09 14:53:15 +0200
commit74a38adb6b4b4bf2a67e7a779a7c95b0ef1b9894 (patch)
treeb6904e651af9c5f7b739fd092b2cd0ef62fe0877 /proto/ospf/topology.h
parent1322e205e2066c0da8526bed505dc699d0f5b92a (diff)
parent2872ab927ecb94b1555f5e3c8bd33021261d0c54 (diff)
Merge branch 'master' of gitlab.labs.nic.cz:labs/bird
Diffstat (limited to 'proto/ospf/topology.h')
-rw-r--r--proto/ospf/topology.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/proto/ospf/topology.h b/proto/ospf/topology.h
index ffae436a..535d1f1b 100644
--- a/proto/ospf/topology.h
+++ b/proto/ospf/topology.h
@@ -33,7 +33,7 @@ struct top_hash_entry
u32 lb_id; /* Interface ID of link back iface (for bcast or NBMA networks) */
u32 dist; /* Distance from the root */
int ret_count; /* Number of retransmission lists referencing the entry */
- u8 dirty; /* Will be flushed during next LSAdb update unless reoriginated*/
+ u8 gr_dirty; /* Local LSA received during GR, will be removed unless reoriginated */
u8 color;
#define OUTSPF 0
#define CANDIDATE 1
@@ -115,10 +115,11 @@ struct top_hash_entry
*/
-#define LSA_M_BASIC 0
-#define LSA_M_EXPORT 1
-#define LSA_M_RTCALC 2
-#define LSA_M_STALE 3
+#define LSA_M_BASIC 0
+#define LSA_M_EXPORT 1
+#define LSA_M_RTCALC 2
+#define LSA_M_EXPORT_STALE 3
+#define LSA_M_RTCALC_STALE 4
/*
* LSA entry modes:
@@ -128,9 +129,13 @@ struct top_hash_entry
* routing table calculation is scheduled. This is also the mode used for LSAs
* received from neighbors. Example: Router-LSAs, Network-LSAs.
*
- * LSA_M_EXPORT - like LSA_M_BASIC, but the routing table calculation does not
- * depend on the LSA. Therefore, the calculation is not scheduled when the LSA
- * is changed. Example: AS-external-LSAs for exported routes.
+ * LSA_M_EXPORT - The LSA is originated using ospf_originate_lsa() as a
+ * consequence of route export to the OSPF instance. It has to be reoriginated
+ * during each channel feed, otherwise it is flushed automatically at the end of
+ * the feed. May be originated and flushed asynchronously. Also, routing table
+ * calculation does not depend on the LSA. Therefore, the routing table
+ * calculation is not scheduled when the LSA is changed. Example:
+ * AS-external-LSAs for exported routes.
*
* LSA_M_RTCALC - The LSA has to be requested using ospf_originate_lsa() during
* each routing table calculation, otherwise it is flushed automatically at the
@@ -138,8 +143,11 @@ struct top_hash_entry
* source for it. Therefore, the calculation is not scheduled when the LSA is
* changed. Example: Summary-LSAs.
*
- * LSA_M_STALE - Temporary state for LSA_M_RTCALC that is not requested during
- * the current routing table calculation.
+ * LSA_M_EXPORT_STALE - Temporary state for LSA_M_EXPORT that is not requested
+ * during current external route feed.
+ *
+ * LSA_M_RTCALC_STALE - Temporary state for LSA_M_RTCALC that is not requested
+ * during current routing table calculation.
*
*
* Note that we do not schedule the routing table calculation when the age of
@@ -181,7 +189,8 @@ struct top_hash_entry * ospf_originate_lsa(struct ospf_proto *p, struct ospf_new
void ospf_advance_lsa(struct ospf_proto *p, struct top_hash_entry *en, struct ospf_lsa_header *lsa, u32 type, u32 domain, void *body);
void ospf_flush_lsa(struct ospf_proto *p, struct top_hash_entry *en);
void ospf_update_lsadb(struct ospf_proto *p);
-void ospf_mark_lsadb(struct ospf_proto *p);
+void ospf_feed_begin(struct channel *C, int initial);
+void ospf_feed_end(struct channel *C);
static inline void ospf_flush2_lsa(struct ospf_proto *p, struct top_hash_entry **en)
{ if (*en) { ospf_flush_lsa(p, *en); *en = NULL; } }