.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "ALB_HANDLE_ADDR_COLLISION_ON_ATTACH" "9" "09 October 2005" "" "" .SH NAME alb_handle_addr_collision_on_attach \- .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int alb_handle_addr_collision_on_attach (struct bonding * \fIbond\fB, struct slave * \fIslave\fB); \fR .SH "ARGUMENTS" .TP \fB\fIbond\fB\fR bonding we're working on .TP \fB\fIslave\fB\fR the slave that was just attached .SH "DESCRIPTION" .PP checks uniqueness of slave's mac address and handles the case the new slave uses the bonds mac address. .PP If the permanent hw address of \fIslave\fR is \fIbond\fR\&'s hw address, we need to find a different hw address to give \fIslave\fR, that isn't in use by any other slave in the bond. This address must be, of course, one of the premanent addresses of the other slaves. .PP We go over the slave list, and for each slave there we compare its permanent hw address with the current address of all the other slaves. If no match was found, then we've found a slave with a permanent address that isn't used by any other slave in the bond, so we can assign it to \fIslave\fR\&. .SH "ASSUMPTION" .PP this function is called before \fIslave\fR is attached to the bond slave list. .PP caller must hold the bond lock for write since the mac addresses are compared and may be swapped.