assert(nbr);
- if (nbr->oi) {
- ifaddr = nbr->oi->address->u.prefix4;
- }
+ ifaddr = nbr->oi->address->u.prefix4;
nbraddr = nbr->address.u.prefix4;
ospf_ls_retransmit_delete_nbr_as(ospf, current);
break;
default:
- ospf_ls_retransmit_delete_nbr_area(nbr->oi->area,
- current);
+ ospf_ls_retransmit_delete_nbr_area(oi->area, current);
break;
}
}
procedure cannot overwrite the newly installed LSA until
MinLSArrival seconds have elapsed. */
- if (!(new = ospf_lsa_install(ospf, nbr->oi, new)))
+ if (!(new = ospf_lsa_install(ospf, oi, new)))
return -1; /* unknown LSA type or any other error condition */
/* Acknowledge the receipt of the LSA by sending a Link State
thread_cancel_event(master, nbr);
ospf_bfd_info_free(&nbr->bfd_info);
+
+ nbr->oi = NULL;
XFREE(MTYPE_OSPF_NEIGHBOR, nbr);
}
nbr->crypt_seqnum = ospfh->u.crypt.crypt_seqnum;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("NSM[%s:%s]: start", IF_NAME(nbr->oi),
+ zlog_debug("NSM[%s:%s]: start", IF_NAME(oi),
inet_ntoa(nbr->router_id));
return nbr;
case OSPF_OPAQUE_LINK_LSA:
/* Exclude type-9 LSAs that does not have the same "oi" with
* "nbr". */
- if (nbr->oi && ospf_if_exists(lsa->oi) != nbr->oi)
+ if (ospf_if_exists(lsa->oi) != nbr->oi)
return 0;
break;
case OSPF_OPAQUE_AREA_LSA:
nbr = THREAD_ARG(thread);
nbr->t_hello_reply = NULL;
- assert(nbr->oi);
-
if (IS_DEBUG_OSPF(nsm, NSM_TIMERS))
zlog_debug("NSM[%s:%s]: Timer (hello-reply timer expire)",
IF_NAME(nbr->oi), inet_ntoa(nbr->router_id));
char ping_nbr[OSPF_PING_NBR_STR_MAX];
int ret;
- if (!nbr || !nbr->oi || !nbr->oi->ifp)
+ if (!nbr)
return;
snprintf(ping_nbr, sizeof(ping_nbr),
if (!nbr)
return NULL;
oi = nbr->oi;
- if (!oi)
- return NULL;
/* Return the current value of the variable */
switch (v->magic) {