Hi. **** First, a description of the problem, so you remind it: **** When ppp is configured with the options demand and ipv6, and it gets an local local-link address different from the one specified in the option, it does not properly remove the old address from the interface when theconnection comes up. The folowing lines are printed by pppd in the terminal:
cif6addr: ioctl(SIOCDIFADDR): No such address sif6addr: ioctl(SIOCADDRT): File exists (line 2486) The interface keeps the old ipv6 address and a new one is added. **** The BUG is in: **** Package: ppp Version: 2.2.4rel-9 pppd/ipv6cp.c:1224, (function ipv6cp_up): ipv6cp_clear_addrs(f->unit, go->ourid, ho->hisid); go->ourid, the new interface id, is passed as parameter to ipv6cp_clear_addrs, but the old interface id should be passed. Is not so easy to fix this, however, because we don't have the old interface ID. **** How I thought I could fix it and why id did not work **** First I tried to pass wo->ourid instead of go->ourid. (wo is the wanted configuration). This works the first time the ppp connection comes up, because the default LL Ipv6 address of our interface is the wanted one. But after the first ppp connection comes down, the interface remains UP and the IPv6 remains the one we obtained during the negociations for the first connection, not necessarily the one we wanted. So, when we connect for the second time and we get a different IPv6 LL, wo->ourid is not the current LL IPv6 of our interface. After I thought to add a static variable with the last used LL IP in the function ipv6cp, but the problem now was for the first connection, when this variable would not be initialised yet. We could mix the first and the second solutions, but after all static variables should be avoided. I think the best way is to modify the fsm structure (that is passed as parameter to ipv6cp8_up) and add the last LL IPv6 there, but I am not sure this is ok. The struct fsm is defined in pppd/fsm.h Thank you for your interest in fixing this bug, I hope this can help you, Alisson Azzolini On 18/08/07, Marco d'Itri <[EMAIL PROTECTED]> wrote: > > On Jul 11, Alisson Azzolini <[EMAIL PROTECTED]> wrote: > > > go->ourid, the new interface id, is passed as parameter to > > ipv6cp_clear_addrs, but the old interface id should be passed. > Where is it? I'd like to fix this bug. > > -- > ciao, > Marco >