(usagi-users 03568) Re: Privacy Extensions problem

Yan Zheng <[email protected]>
Newsgroups gmane.linux.ipv6.usagi.users
Message-ID <[email protected]>
Hiroyuki YAMAMORI wrote:
> Hello,
> 
> I tried Privacy Extensions, but passed amount of time, kernel put out
> following message and stoped to make temporary address.
> 
>  ipv6_create_tempaddr(): regeneration time exceeded. disabled temporary address support.
> 
> I've made a fix-patch with other problems as following;
> 
> Hunk 1: If RA does not come in amount of time (in something trouble)
> and ifpub(it has EUI-64 addr) becomes deprecated, and then RA comes again
> ifpub becomes OK. But temporary address is not made any more.
> Fix it.
> 
> Hunk 2: redundancy code.
> 
> Hunk 3: Main code, initialize regen_count.
> 
> Thanks,
> --
> Hiroyuki YAMAMORI <[email protected]>
> 
> --- linux-2.6.14.3usagi-s20051121/net/ipv6/addrconf.c
> +++ linux-2.6.14.3new/net/ipv6/addrconf.c
> @@ -1754,6 +1754,8 @@
>  				ifp->flags &= ~IFA_F_DEPRECATED;
>  				spin_unlock(&ifp->lock);
>  
> +				if (flags&IFA_F_DEPRECATED)
> +					create = 1;
>  				if (!(flags&IFA_F_TENTATIVE))
>  					ipv6_ifa_notify(0, ifp);
>  			} else
> @@ -2683,10 +2685,6 @@
>  			unsigned long regen_advance;
>  #endif
>  
> -#ifdef CONFIG_IPV6_PRIVACY
> -			regen_advance = ifp->idev->cnf.regen_max_retry * ifp->idev->cnf.dad_transmits * ifp->idev->nd_parms->retrans_time / HZ;
> -#endif
> -
>  			if (ifp->flags & IFA_F_PERMANENT)
>  				continue;
>  
> @@ -2740,6 +2738,9 @@
>  					in6_ifa_hold(ifpub);
>  					spin_unlock(&ifp->lock);
>  					write_unlock(&addrconf_hash_lock);
> +					spin_lock(&ifpub->lock);
> +					ifpub->regen_count = 0;
> +					spin_unlock(&ifpub->lock);
>  					ipv6_create_tempaddr(ifpub, ifp);
>  					in6_ifa_put(ifpub);
>  					in6_ifa_put(ifp);
> 
> 
> 

I think it's better reset regen_count when succeed in creating a temporary address(Pass DAD).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.