summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.h
diff options
context:
space:
mode:
authorManoj Naragund <mnaragund@vmware.com>2022-11-21 12:35:01 +0100
committerManoj Naragund <mnaragund@vmware.com>2023-01-20 06:03:03 +0100
commitee09fbc0a57dcf323223e669db5e30b7e49bdded (patch)
treee717b2e8f29df4e5bbad3697b2cad87e32d184b3 /ospfd/ospf_lsa.h
parentospfd: CLI changes to enable/disable OSPFv2 Flood reduction. (diff)
downloadfrr-ee09fbc0a57dcf323223e669db5e30b7e49bdded.tar.xz
frr-ee09fbc0a57dcf323223e669db5e30b7e49bdded.zip
ospfd: ospf hello changes.
Description: The changes involve setting DC bit on ospf hellos and addition of new DO_NOT_AGE flag. Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
Diffstat (limited to 'ospfd/ospf_lsa.h')
-rw-r--r--ospfd/ospf_lsa.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h
index 1caf8047e..a5397b5fd 100644
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -60,6 +60,7 @@
/* OSPF LSA header. */
struct lsa_header {
uint16_t ls_age;
+#define DO_NOT_AGE 0x8000
uint8_t options;
uint8_t type;
struct in_addr id;
@@ -233,6 +234,9 @@ enum lsid_status { LSID_AVAILABLE = 0, LSID_CHANGE, LSID_NOT_AVAILABLE };
|| (type == OSPF_SUMMARY_LSA) || (type == OSPF_ASBR_SUMMARY_LSA) \
|| (type == OSPF_AS_EXTERNAL_LSA) || (type == OSPF_AS_NSSA_LSA))
+#define OSPF_FR_CONFIG(o, a) \
+ (o->fr_configured || ((a != NULL) ? a->fr_info.configured : 0))
+
/* Prototypes. */
/* XXX: Eek, time functions, similar are in lib/thread.c */
extern struct timeval int2tv(int);
@@ -358,4 +362,24 @@ extern void ospf_check_and_gen_init_seq_lsa(struct ospf_interface *oi,
extern void ospf_flush_lsa_from_area(struct ospf *ospf, struct in_addr area_id,
int type);
extern void ospf_maxage_lsa_remover(struct thread *thread);
+extern bool ospf_check_dna_lsa(const struct ospf_lsa *lsa);
+extern void ospf_refresh_area_self_lsas(struct ospf_area *area);
+
+/** @brief Check if the LSA is an indication LSA.
+ * @param lsa pointer.
+ * @return true or false based on lsa info.
+ */
+static inline bool ospf_check_indication_lsa(struct ospf_lsa *lsa)
+{
+ struct summary_lsa *sl = NULL;
+
+ if (lsa->data->type == OSPF_ASBR_SUMMARY_LSA) {
+ sl = (struct summary_lsa *)lsa->data;
+ if ((GET_METRIC(sl->metric) == OSPF_LS_INFINITY) &&
+ !CHECK_FLAG(lsa->data->options, OSPF_OPTION_DC))
+ return true;
+ }
+
+ return false;
+}
#endif /* _ZEBRA_OSPF_LSA_H */