diff options
| author | Manoj Naragund <mnaragund@vmware.com> | 2022-11-21 03:35:01 -0800 | 
|---|---|---|
| committer | Manoj Naragund <mnaragund@vmware.com> | 2023-01-19 21:03:03 -0800 | 
| commit | ee09fbc0a57dcf323223e669db5e30b7e49bdded (patch) | |
| tree | e717b2e8f29df4e5bbad3697b2cad87e32d184b3 /ospfd/ospf_lsa.h | |
| parent | 75b837a3d5908e8c41954e1a659f8e44de610c04 (diff) | |
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.h | 24 | 
1 files changed, 24 insertions, 0 deletions
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h index 1caf8047e4..a5397b5fdb 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 */  | 
