I've addressed the IPv6 DAD issues in this updated webrev. There were a few problems which prevented v6 from working. Firstly libinetcfg was not using icfg_set_addr() (which checks for DAD failure) for added (logical interface) addresses. Secondly, we have a workaround in nwamd_handle_if_state_event() which we use to zero out cached v4 lease addresses, but we didn't ensure that it was being applied to v4 interfaces only. So IPv6 DAD (wrongly) fitted the criteria for application of this workaround, and as a consequence we never got to the point in the code where we check flags for IFF_DUPLICATE.
Updated webrev at: http://zhadum.east.sun.com/export/ws/amaguire/nwam1-bugs/webrev/ Alan On 07/02/2010 22:39, Alan Maguire wrote: > On 05/02/2010 17:53, Michael Hunter wrote: >> On Fri, 05 Feb 2010 16:53:02 +0000 >> Alan Maguire<Alan.Maguire at Sun.COM> wrote: >> >>> I've had to make a few changes here as a result >>> of additional testing. Firstly, we need to be a >>> bit more discerning about when we send events >>> to listeners. This is particularly true in this >>> case since the original webrev would have >>> resulted in us sending out online/up OBJECT_STATE >>> events even though we were in maintenance >>> state. To deal with this I've added a boolean >>> "event_send" field to the nwamd_event_t, and >>> if an invalid state transition is attempted, >>> or processing of an event fails (e.g. we get an >>> IF_STATE event for an object we don't manage), >>> we set event_send to false so the GUI won't >>> get such messages. Secondly, it turns out >>> we can also get ICFG_DAD_FOUND from >>> icfg_set_flags(), so I've modified add_ip_addres() >>> to take this into account. >>> >>> Finally in testing I can't get v6 DAD working. >>> If I add a static duplicate v6 address I see >>> the "duplicate address detected" log message >>> from IP along with the RTM_CHGADDRs for the >>> address, but nwamd doesn't get back ICFG_DAD_FOUND >>> in this case. I'll keep looking at this, but my >>> feeling is that it might make sense to push >>> ahead with these changes and file a separate >>> v6 bug for further investigation post-integration. >>> >>> Updated webrev: >>> >>> http://zhadum.east.sun.com/export/ws/amaguire/nwam1-bugs/webrev/ >> Overall: some of these are a little scary in the error cases we don't >> handle. >> >> You can't do much about that in this bug fix but you might actually >> change this flag via an accessor function so we can hook these changes >> when debugging? > Good idea - I've added nwamd_event_do_not_send() which > will log the fact we cancel event delivery. Webrev updated. > Thanks! > > Alan > _______________________________________________ > nwam-dev mailing list > nwam-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/nwam-dev
