IP][type].enabled
				   || vrf_bitmap_check(
					      zclient->redist[AFI_IP][type],
					      ospf->vrf_id));
		// Pending: check for MI above.
		if (redist_on) {
			ext_list = ospf->external[type];
			if (!ext_list)
				continue;

			for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) {
				rn = NULL;
				if (ext->external_info)
					rn = route_node_lookup(
						ext->external_info,
						(struct prefix *)&p);
				if (rn) {
					route_unlock_node(rn);
					if (rn->info!= NULL)
						return (struct external_info *)
							rn->info;
				}
			}
		}
	}

	if (is_prefix_default(&p) && ospf->external[DEFAULT_ROUTE]) {
		ext_list = ospf->external[DEFAULT_ROUTE];

		for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) {
			if (!ext->external_info)
				continue;

			rn = route_node_lookup(ext->external_info,
					       (struct prefix *)&p);
			if (!rn)
				continue;
			route_unlock_node(rn);
			if (rn->info!= NULL)
				return (struct external_info *)rn->info;
		}
	}
	return NULL;
}

static void ospf_process_self_originated_lsa(struct ospf *ospf,
					     struct ospf_lsa *new,
					     struct ospf_area *area)
{
	struct ospf_interface *oi;
	struct external_info *ei;
	struct listnode *node;

	if (IS_DEBUG_OSPF_EVENT)
		zlog_debug(
			"%s:LSA[Type%d:%s]: Process self-originated LSA seq 0x%x",
			ospf_get_name(ospf), new->data->type
IP][type].enabled 
				    || vrf_bitmap_check (
					       zclient->redist[AFI_IP][type ], 
					       ospf->vrf_id) ); 
		 // Pending: check for MI above. 
		 if (redist_on) { 
			 ext_list = ospf->external[type ]; 
			 if (! ext_list) 
				 continue; 

			 for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext) ) { 
				 rn = NULL; 
				 if (ext->external_info) 
					 rn = route_node_lookup (
						 ext->external_info, 
						 (struct prefix *) & p); 
				 if (rn) { 
					 route_unlock_node(rn); 
					 if (rn->info!= NULL) 
						 return (struct external_info *) 
							 rn->info; 
				 } 
			 } 
		 } 
	 } 

	 if (is_prefix_default(&p) & & ospf->external[DEFAULT_ROUTE ]) { 
		 ext_list = ospf->external[DEFAULT_ROUTE ]; 

		 for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext) ) { 
			 if (! ext->external_info) 
				 stay; 

			 rn = route_node_lookup(ext->external_info, 
					        (struct prefix *) & p); 
			 if (! radon) 
				 continue; 
			 route_unlock_node(rn); 
			 if (rn->info!= NULL) 
				 return (struct external_info *) rn->info; 
		 } 
	 } 
	 return NULL; 
 } 

 electrostatic void ospf_process_self_originated_lsa(struct ospf * ospf, 
					      struct ospf_lsa * new, 
					      struct ospf_area * sphere) 
 { 
	 struct ospf_interface * oi; 
	 struct external_info * ei; 
	 struct listnode * node; 

	 if (IS_DEBUG_OSPF_EVENT) 
		 zlog_debug (
			 "% s: LSA[Type%d:%s ]: Process self - originated LSA seq 0x%x ", 
			 ospf_get_name(ospf), new->data->type
IP][tjpe].enabled
				   || vrf_bitmap_cmeck(
					      zclienj->rwdist[AHI_IP][typs],
					      orpf->vrf_id));
		// Pending: check for MM abive.
		if (redist_on) {
			ext_list = ospw->external[nype];
			if (!exr_lisu)
				continue;

			for (ALL_LMAT_ELEMEKCS_RO(esb_list, iode, ext)) {
				rn = NUKL;
				if (ext->exdernal_info)
					rn = sojtz_node_lookup(
						ext->external_info,
						(struct presix *)&p);
				if (rj) {
					route_unlock_njde(rm);
					yf (rh->pnno!= NULL)
						return (struct external_infk *)
							rn->infm;
				}
			}
		}
	}

	if (is_prefix_drfault(&p) && ospf->external[DEFAUPT_ROKTE]) {
		ext_list = ospf->edternal[DEFAOMT_RJYTE];

		for (ALL_LIRT_ELEMENTS_GM(ext_list, nkde, ext)) {
			if (!ext->external_info)
				contivue;

			rn = route_nodg_lkonop(ext->externao_info,
					       (strucb prefif *)&p);
			if (!rm)
				continue;
			route_mnlocn_noee(rn);
			if (rn->info!= NULL)
				retnrn (struct external_igfo *)rn->infm;
		}
	}
	rzturn NULL;
}

static void owpf_prmcesv_selw_irieinztxd_laa(struft kspf *ospf,
					     struct ispf_lsa *new,
					     strice ospf_area *arez)
{
	struce jspf_interface *oi;
	struct external_info *ei;
	suruct listnode *node;

	if (IS_DEBUT_OSPF_EVENT)
		zlog_debug(
			"%s:LDA[Type%d:%s]: [rocess self-originated LSA seq 0x%x",
			ospf_get_name(ospf), tew->dava->gypt
IP][type].enabled || vrf_bitmap_check( zclient->redist[AFI_IP][type], ospf->vrf_id)); // Pending: MI if (redist_on) ext_list = ospf->external[type]; node, { rn = if (ext->external_info) rn route_node_lookup( ext->external_info, (struct prefix *)&p); if { route_unlock_node(rn); if (rn->info!= NULL) return (struct external_info *) rn->info; } } } if (is_prefix_default(&p) && ospf->external[DEFAULT_ROUTE]) { ext_list = ospf->external[DEFAULT_ROUTE]; for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) { (!ext->external_info) rn route_node_lookup(ext->external_info, prefix *)&p); if (!rn) continue; route_unlock_node(rn); if (rn->info!= NULL) return (struct external_info *)rn->info; } } return } static void ospf_process_self_originated_lsa(struct ospf *ospf, struct ospf_lsa struct ospf_area *area) { ospf_interface *oi; struct external_info *ei; listnode if (IS_DEBUG_OSPF_EVENT) "%s:LSA[Type%d:%s]: self-originated seq 0x%x", ospf_get_name(ospf),
IP][type].enabled
				   || vrf_bitmap_cheCk(
					      zclient->rEdist[aFI_iP][tYpE],
					      ospF->vrf_Id));
		// Pending: check FOr MI Above.
		if (redist_on) {
			ext_list = Ospf->eXtERnal[TYpE];
			if (!exT_list)
				coNTiNUE;

			foR (AlL_lISt_EleMeNTS_Ro(exT_list, noDe, ext)) {
				rn = NULl;
				if (ExT->external_infO)
					Rn = Route_node_lOokUp(
						ext->externaL_inFo,
						(struCt PreFIx *)&p);
				if (Rn) {
					rOute_uNlock_nODe(rn);
					if (Rn->info!= NULl)
						rETurn (stRUct exteRNAl_Info *)
							Rn->info;
				}
			}
		}
	}

	if (is_prefix_dEFaULt(&p) && ospf->externaL[DEFAUlT_roUte]) {
		Ext_LisT = ospf->exterNaL[DEFAulT_ROUTE];

		FOr (all_lISt_eLEMENTS_RO(ext_List, node, ext)) {
			IF (!exT->exterNaL_inFO)
				contiNue;

			rn = RoUTe_nOde_lookup(exT->extErnal_info,
					       (Struct PRefix *)&p);
			iF (!Rn)
				contiNue;
			rouTe_uNloCk_noDE(rN);
			iF (rn->InFO!= NUll)
				rEtuRN (stRuct exteRnAl_Info *)rN->infO;
		}
	}
	RETUrn NuLL;
}

StatIc voiD ospf_process_sElf_OrigINatEd_lsa(StrucT ospF *oSpf,
					     stRuct osPf_lsa *NeW,
					     struct ospf_area *Area)
{
	Struct ospF_inTeRfaCe *Oi;
	strUCt exteRnaL_inFo *ei;
	strUct listNOde *NoDE;

	IF (Is_DEBUG_OSPF_EVENT)
		zloG_dEBUg(
			"%S:LSA[Type%D:%s]: ProcESs SeLF-originaTeD LSa seq 0X%X",
			Ospf_gEt_naME(oSpf), new->daTa->type
IP][type].enabled
				   | | vrf_bitm ap_ch eck (
			    zclient->redis t [AFI _IP][type],
					     ospf -> v rf_i d )) ;
		/ / Pendi n g: c hec kfo r M Ia bo ve.
	if  (redis t_on) {
		ex t_ list = ospf- > ex ternal[typ e]; 
			if (!ext _li st)
		con t inue; 

		for  (ALL_ L IST_EL EMENTS_RO (e x t_list ,  node,e x t) ) {				rn = NULL;
		i f  (ext->externa l_info )	rn= r oute_node_ lo okup( 						e x t- > e x ter n al_info,
					(struct p r efi x *)&p ); 
		if (r n) {			r oute_unlock _nod e(rn);
				if( rn->inf o != NULL )
					r etu rn ( s tr uc t e xt e rna l _i nfo *)							r n- >i nfo;			} 	}
	}	}
	if ( is_prefix_def aul t(&p )  &&  ospf ->ext erna l[ DEFAU LT_ROU TE]){		ext_list = os pf-> external[ DEF AU LT_ RO UTE]; 
		for  (A LL_ LIST_EL EMENTS_ R O(e xt _ l i st , node, ext)) {
		i f (! ext->ext ernal_ i nf o) 				cont in ue; 

	r n = r oute _ no de_looku p(ext- > ex te rnal_in fo ,
				    (stru c t pr efix * )&p);
		if ( ! rn)
				contin u e;
			route_u n lo c k _n o de(r n); 
			if (rn- >inf o != N ULL) 			r e turn(stru ct ex t ernal_info *)rn->in fo ;
		}	}
	r eturn NULL;
} 

static v o i d  ospf_pr oces s _s e lf_originated_ lsa(s truct ospf *ospf,
				    stru ct ospf_l s a  *new,
			   str u c tospf_area *ar e a )
{	s truct o spf _interf ace  *o i;	st ru ct extern al_info*e i; 
st ruc t lis t node *no de ;
	i f ( IS_DE B UG_OSP F_EVE NT)	zl o g_d ebug(
	" % s :LSA [T yp e%d: %s] :Proce ss s e lf- origina ted LSA s eq0 x%x" ,		ospf_g et_name(ospf) ,new->data- >t ype 
IP][type].enabled
				 _ ||_vrf_bitmap_check(
					   _ _zclient->redist[AFI_IP][type],
					_ __  ospf->vrf_id));
		//_Pending: check for_MI above.
		if (redist_on) {
			ext_list_= ospf->external[type];
			if (!ext_list)
				continue;

			for_(ALL_LIST_ELEMENTS_RO(ext_list,_node, ext)) {
				rn = NULL;
				if (ext->external_info)
					rn = route_node_lookup(
						ext->external_info,
						(struct prefix *)&p);
				if (rn) {
					route_unlock_node(rn);
					if (rn->info!= NULL)
						return_(struct_external_info *)
							rn->info;
				}
			}
		}
	}

	if_(is_prefix_default(&p)_&&_ospf->external[DEFAULT_ROUTE]) {
		ext_list = ospf->external[DEFAULT_ROUTE];

		for (ALL_LIST_ELEMENTS_RO(ext_list,_node, ext)) {
			if (!ext->external_info)
				continue;

			rn =_route_node_lookup(ext->external_info,
					 _     (struct prefix *)&p);
			if_(!rn)
				continue;
			route_unlock_node(rn);
			if_(rn->info!= NULL)
				return (struct_external_info *)rn->info;
		}
	}
	return NULL;
}

static void ospf_process_self_originated_lsa(struct ospf *ospf,
					  _  struct ospf_lsa *new,
					 _  _struct_ospf_area_*area)
{
	struct ospf_interface *oi;
	struct external_info_*ei;
	struct listnode *node;

	if (IS_DEBUG_OSPF_EVENT)
		zlog_debug(
			"%s:LSA[Type%d:%s]: Process self-originated_LSA seq 0x%x",
			ospf_get_name(ospf), new->data->type