alb_handle_...on_on_attach(9)
β¨ NAME β¨
alb_handle_addr_collision_on_attach β bestie, this is the little function that handles MAC address drama when a new slave joins the bond π
(the original page literally leaves the description blank, so we're just gonna say it like it is, no cap)
π SYNOPSIS π
int alb_handle_addr_collision_on_attach (struct bonding *bond , struct
slave *slave );
π ARGUMENTS π
bondβ the bonding we're working on, aka the whole squad π«Άslaveβ the slave that was just attached, aka the new girl who just walked in π
πΈ DESCRIPTION πΈ
Okay so first thing first: this function checks whether the slave's MAC address is actually unique, and then it handles the situation where the new slave is out here using the bond's own MAC address. Awkward. π
So here's the tea π β if the permanent hw address of the slave happens to be the bond's hw address, we gotta go find a different hw address to give the slave. And it can't be one that's already in use by any other slave in the bond. And it must, of course, be one of the permanent addresses of the other slaves. Like, that's non-negotiable, iykyk.
The way we do it: 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, congrats bestie π we've officially found a slave with a permanent address that isn't used by any other slave in the bond, so we can just assign it to slave. Slay.
assumption: this function is called before slave is attached to the bond slave list. Like, that's the whole vibe check, don't skip it π
π¦ SEE ALSO π¦
- Kernel file
./drivers/net/bonding/bond_alb.c alb_change_hw_addr_on_detach(9)alb_set_mac_address(9)bond_alb_handle_active_change(9)
kcso like that's the whole page, hope it ate π
β¨ this came straight out of ./drivers/net/bonding, dated October 2026 β mwah, love u, bye! πππ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms