bond_set_dev_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– bond_set_dev_addr(9) πŸ’–

Okay so bestie, you found it β€” this is a page from the Kernel API Manual, and it's about one very specific little function. No cap, it's a tiny one, but it matters. Let's get into it πŸŽ€


✨ NAME ✨

bond_set_dev_addr β€” the function that clones a slave's address over to the bond. Yep. That's the whole job. It's giving "copy-paste but make it networking" πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int bond_set_dev_addr (struct net_device *bond_dev , struct net_device *slave_dev );

Two pointers, one int coming back at you. Simple. Elegant. Iconic.


🌸 ARGUMENTS 🌸

  • bond_dev β€” the bond net device. This is the main character πŸ‘‘ the one getting the address.
  • slave_dev β€” the slave net device. This is where the address is coming from, iykyk 🫢

πŸ”₯ DESCRIPTION πŸ”₯

So here's the one thing you actually cannot forget:

Should be called with RTNL held. Periodt. πŸ’€

Like, not "maybe", not "if you feel like it" β€” RTNL needs to be held when you call this. That's the vibe check and you better pass it.


🌈 SEE ALSO 🌈

Kernel file ./drivers/net/bonding/bond_main.c β€” the mothership 🧚 and honestly go look at these too, they're all in the same friend group:


Okay that's the whole page, you ate that πŸ’– This little gem lives over in ./drivers/net/bonding, tagged October 2026, and it's bond_set_dev_addr(9) β€” slay, go hold your RTNL and be free πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from