	BIT_SET(adv->adv_gwp->gw_flags, flag);
	adv->adv_gwp->gw_proto = proto;
	adv->adv_proto = proto;
	assert(!adv->adv_list);
	adv->adv_list = advlist;
	    BIT_SET(adv->adv_flag, ADVF_NO);
	    BIT_SET(adv->adv_flag, ADVFOT_METRIC);
	    adv->adv_result.res_metric = metric->metric;
	    adv->adv_refcount += times;
	adv->adv_proto = proto;
	assert(!adv->adv_list);
	adv->adv_list = advlist;
	    BIT_SET(adv->adv_flag, ADVF_NO);
	    BIT_SET(adv->adv_flag, ADVFOT_METRIC);
	    adv->adv_result.res_preference = preference->metric;
	    adv->adv_refcount += times;
	    if (adv->adv_dm.dm_ps == (void_t) NULL) {
	    	adv->adv_dm.dm_ps = (void_t) p_idrpRoute_info;
    	    	((idrpRoute_info *) adv->adv_dm.dm_ps)->idrp_pref = preference->idrp_pref;
	    adv->adv_refcount += times;
	    BIT_SET(adv->adv_flag, ADVFOT_CONFIG);
	    adv->adv_config = config;
	    adv->adv_proto = proto;
    	BIT_SET(adv->adv_flag, ADVF_NO);
	if (adv->adv_as == list->adv_as) {
	list = adv_alloc(ADVFT_AS, adv->adv_proto);
	list->adv_as = adv->adv_as;
	if (!iso_net_addr_cmp(adv->adv_rdi, list->adv_rdi)) {
	list = adv_alloc(ADVFT_RDI, adv->adv_proto);
	list->adv_rdi = adv->adv_rdi;
