summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorrgirada <rgirada@vmware.com>2020-08-15 09:27:25 +0200
committerrgirada <rgirada@vmware.com>2020-11-02 06:10:31 +0100
commitcb2bc4cb0293fca15794c67726a87c699553cf10 (patch)
tree4fe0affd737c602a55cafe82c4189083ed398265 /ospfd
parentMerge pull request #7429 from opensourcerouting/rpm-subpkgs (diff)
downloadfrr-cb2bc4cb0293fca15794c67726a87c699553cf10.tar.xz
frr-cb2bc4cb0293fca15794c67726a87c699553cf10.zip
ospfd: summarisation specific data structures.
Description: Data structures definitions for summary route. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_asbr.h51
-rw-r--r--ospfd/ospf_dump.h1
-rw-r--r--ospfd/ospfd.h16
3 files changed, 67 insertions, 1 deletions
diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h
index ede6c4790..ec02fa15a 100644
--- a/ospfd/ospf_asbr.h
+++ b/ospfd/ospf_asbr.h
@@ -50,8 +50,57 @@ struct external_info {
route_tag_t orig_tag;
struct route_map_set_values route_map_set;
-#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric
+#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric
#define ROUTEMAP_METRIC_TYPE(E) (E)->route_map_set.metric_type
+
+ /* Back pointer to summary address */
+ struct ospf_external_aggr_rt *aggr_route;
+
+ /* To identify the routes to be originated
+ * after a summary address deletion.
+ */
+ bool to_be_processed;
+};
+
+#define OSPF_EXTL_AGGR_DEFAULT_DELAY 5
+
+#define OSPF_EXTERNAL_RT_COUNT(aggr) \
+ (((struct ospf_external_aggr_rt *)aggr)->match_extnl_hash->count)
+
+enum ospf_aggr_action_t {
+ OSPF_ROUTE_AGGR_NONE = 0,
+ OSPF_ROUTE_AGGR_ADD,
+ OSPF_ROUTE_AGGR_DEL,
+ OSPF_ROUTE_AGGR_MODIFY
+};
+
+#define OSPF_SUCCESS 1
+#define OSPF_FAILURE 0
+#define OSPF_INVALID -1
+
+#define OSPF_EXTERNAL_AGGRT_NO_ADVERTISE 0x1
+#define OSPF_EXTERNAL_AGGRT_ORIGINATED 0x2
+
+/* Data structures for external route aggregator */
+struct ospf_external_aggr_rt {
+ /* Prefix. */
+ struct prefix_ipv4 p;
+
+ /* Bit 1 : Dont advertise.
+ * Bit 2 : Originated as Type-5
+ */
+ uint8_t flags;
+
+ /* Tag for summary route */
+ route_tag_t tag;
+
+ /* Action to be done at the delay
+ * timer expairy.
+ */
+ enum ospf_aggr_action_t action;
+
+ /* Hash Table of external routes */
+ struct hash *match_extnl_hash;
};
#define OSPF_ASBR_CHECK_DELAY 30
diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h
index a2df4ff22..ea607fef7 100644
--- a/ospfd/ospf_dump.h
+++ b/ospfd/ospf_dump.h
@@ -49,6 +49,7 @@
#define OSPF_DEBUG_LSA_INSTALL 0x04
#define OSPF_DEBUG_LSA_REFRESH 0x08
#define OSPF_DEBUG_LSA 0x0F
+#define OSPF_DEBUG_EXTNL_LSA_AGGR 0x10
#define OSPF_DEBUG_ZEBRA_INTERFACE 0x01
#define OSPF_DEBUG_ZEBRA_REDISTRIBUTE 0x02
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index 5be897400..bdd09e1e7 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -355,6 +355,22 @@ struct ospf {
/* last HELPER exit reason */
uint32_t last_exit_reason;
+ /* delay timer to process external routes
+ * with summary address.
+ */
+ struct thread *t_external_aggr;
+
+ /* delay interval in seconds */
+ unsigned int aggr_delay_interval;
+
+ /* Table of configured Aggregate addresses */
+ struct route_table *rt_aggr_tbl;
+
+ /* used as argument for aggr delay
+ * timer thread.
+ */
+ int aggr_action;
+
/* MPLS LDP-IGP Sync */
struct ldp_sync_info_cmd ldp_sync_cmd;