log_debug("rde_redistribute: prefix %s/%d used %d", inet_ntoa(kr->prefix), kr->prefixlen, rv);
LIST_HEAD(, rde_asext) rde_asext_list;intrde_redistribute(struct kroute *kr){	struct area	*area;	struct iface	*iface;	int		 rv = 0;	if (!(kr->flags & F_KERNEL))		return (0);	if ((rdeconf->options & OSPF_OPTION_E) == 0)		return (0);	if ((rdeconf->redistribute_flags & REDISTRIBUTE_DEFAULT) &&	    (kr->prefix.s_addr == INADDR_ANY && kr->prefixlen == 0))		return (1);	/* only allow 0.0.0.0/0 if REDISTRIBUTE_DEFAULT */	if (kr->prefix.s_addr == INADDR_ANY && kr->prefixlen == 0)		return (0);	if ((rdeconf->redistribute_flags & REDISTRIBUTE_STATIC) &&	    (kr->flags & F_STATIC))		rv = 1;	if ((rdeconf->redistribute_flags & REDISTRIBUTE_CONNECTED) &&	    (kr->flags & F_CONNECTED))		rv = 1;	/* interface is not up and running so don't announce */	if (kif_validate(kr->ifindex) == 0)		return (0);	LIST_FOREACH(area, &rdeconf->area_list, entry)		LIST_FOREACH(iface, &area->iface_list, entry) {			if ((iface->addr.s_addr & iface->mask.s_addr) ==			    kr->prefix.s_addr && iface->mask.s_addr ==			    prefixlen2mask(kr->prefixlen))				rv = 0;	/* already announced as net LSA */		}	log_debug("rde_redistribute: prefix %s/%d used %d",	    inet_ntoa(kr->prefix), kr->prefixlen, rv);	return (rv);}