void iterator_set_ip46_support(struct module_stack* mods,
	struct module_env* env, struct outside_network* outnet)
{
	int m = modstack_find(mods, "iterator");
	struct iter_env* ie = NULL;
	if(m == -1)
		return;
	ie = (struct iter_env*)env->modinfo[m];
	if(outnet->pending == NULL)
		return; /* we are in testbound, no rbtree for UDP */
	if(outnet->num_ip4 == 0)
		ie->supports_ipv4 = 0;
	if(outnet->num_ip6 == 0)
		ie->supports_ipv6 = 0;
}
void iterator_set_ip46_support(struct module_stack* mods,
	struct module_env* env, struct outside_network* outnet)
{
	int m = modstack_find(mods, "iterator");
	struct iter_env* ie = NULL;
	if(m == -1)
		return;
	ie = (struct iter_env*)env->modinfo[m];
	if(outnet->pending == NULL)
		return;  
	if(outnet->num_ip4 == 0)
		ie->supports_ipv4 = 0;
	if(outnet->num_ip6 == 0)
		ie->supports_ipv6 = 0;
}