diff options
| author | rgirada <rgirada@vmware.com> | 2021-06-28 04:55:27 -0700 | 
|---|---|---|
| committer | rgirada <rgirada@vmware.com> | 2021-08-10 02:57:23 -0700 | 
| commit | 0d1753a7db0c8fa3839918ec8eccb207ba1d2594 (patch) | |
| tree | 7a2626e83a774d7a49b9dde74583d5c76f70a1a3 /ospf6d/ospf6_flood.c | |
| parent | 0694366601e1be40c2a5ef903a280fabe5c2b170 (diff) | |
ospf6d: Helper functionality changes
Description:
	1. changes to process GRACE LSA packet.
	2. Validation changes to enter Helper role.
	3. Helper functionality during graceful restart.
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
| -rw-r--r-- | ospf6d/ospf6_flood.c | 25 | 
1 files changed, 25 insertions, 0 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 3d52597161..77c2ad1628 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -41,6 +41,7 @@  #include "ospf6_flood.h"  #include "ospf6_nssa.h" +#include "ospf6_gr.h"  unsigned char conf_debug_ospf6_flooding; @@ -999,6 +1000,30 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,  		    != from->ospf6_if->area->ospf6->router_id)  			ospf6_flood(from, new); +		/* Received Grace-LSA */ +		if (IS_GRACE_LSA(new)) { +			struct ospf6 *ospf6; + +			ospf6 = ospf6_get_by_lsdb(new); + +			assert(ospf6); + +			if (IS_DEBUG_OSPF6_GR_HELPER) +				zlog_debug( +					"%s, Received a GraceLSA from router %d", +					__PRETTY_FUNCTION__, +					new->header->adv_router); + +			if (ospf6_process_grace_lsa(ospf6, new, from) +			    == OSPF6_GR_NOT_HELPER) { +				if (IS_DEBUG_OSPF6_GR_HELPER) +					zlog_debug( +						"%s, Not moving to HELPER role, So dicarding GraceLSA", +						__PRETTY_FUNCTION__); +				return; +			} +		} +  		/* (d), installing lsdb, which may cause routing  			table calculation (replacing database copy) */  		ospf6_install_lsa(new);  | 
