ls_retrans_list_free(nbr, le);
ls_retrans_list_free(iface->self, le);
lsa_flood(struct iface *iface, struct nbr *originator, struct lsa_hdr *lsa_hdr,    void *data, u_int16_t len){	struct in_addr		 addr;	struct nbr		*nbr;	struct lsa_entry	*le = NULL;	int			 queued = 0, dont_ack = 0;	int			 r;	LIST_FOREACH(nbr, &iface->nbr_list, entry) {		if (nbr == iface->self)			continue;		if (!(nbr->state & NBR_STA_FLOOD))			continue;		if (iface->state & IF_STA_DROTHER)			if ((le = ls_retrans_list_get(iface->self, lsa_hdr)))			    ls_retrans_list_free(nbr, le);		if ((le = ls_retrans_list_get(nbr, lsa_hdr)))			ls_retrans_list_free(nbr, le);		if (!(nbr->state & NBR_STA_FULL) &&		    (le = ls_req_list_get(nbr, lsa_hdr)) != NULL) {			r = lsa_newer(lsa_hdr, le->le_lsa);			if (r > 0) {				/* to flood LSA is newer than requested */				ls_req_list_free(nbr, le);				/* new needs to be flooded */			} else if (r < 0) {				/* to flood LSA is older than requested */				continue;			} else {				/* LSA are equal */				ls_req_list_free(nbr, le);				continue;			}		}		if (nbr == originator) {			dont_ack++;			continue;		}		/* non DR or BDR router keep all lsa in one retrans list */		if (iface->state & IF_STA_DROTHER) {			if (!queued)				ls_retrans_list_add(iface->self, data);			queued = 1;		} else if (iface->dr != nbr) {			/*			 * DR and BDR queue a packet to all other routers			 * exept to the DR. The BDR does not need to			 * retransmit LSA to the DR -- this will be done			 * by the originatior.			 */			ls_retrans_list_add(nbr, data);			queued = 1;		}	}	if (!queued)		return (0);	if (iface == originator->iface && iface->self != originator) {		if (iface->dr == originator || iface->bdr == originator)			return (0);		if (iface->state & IF_STA_BACKUP)			return (0);		dont_ack++;	}	/* flood LSA but first set correct destination */	switch (iface->type) {	case IF_TYPE_POINTOPOINT:		inet_aton(AllSPFRouters, &addr);		send_ls_update(iface, addr, data, len);		break;	case IF_TYPE_BROADCAST:		if (iface->state & IF_STA_DRORBDR)			inet_aton(AllSPFRouters, &addr);		else			inet_aton(AllDRouters, &addr);		send_ls_update(iface, addr, data, len);		break;	case IF_TYPE_NBMA:	case IF_TYPE_POINTOMULTIPOINT:	case IF_TYPE_VIRTUALLINK:		LIST_FOREACH(nbr, &iface->nbr_list, entry) {			if (nbr == iface->self)				continue;			if (!(nbr->state & NBR_STA_FLOOD))				continue;			if (!TAILQ_EMPTY(&nbr->ls_retrans_list)) {				le = TAILQ_LAST(&nbr->ls_retrans_list,				    lsa_head);				if (lsa_hdr->type != le->le_lsa->type ||				    lsa_hdr->ls_id != le->le_lsa->ls_id ||				    lsa_hdr->adv_rtr != le->le_lsa->adv_rtr)					continue;			}			send_ls_update(iface, nbr->addr, data, len);		}		break;	default:		fatalx("lsa_flood: unknown interface type");	}	return (dont_ack == 2);}