alb_handle_...on_on_attach(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 πŸ¦‹


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