BRIDGE STP MODE VALUES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ NAME

Bridge STP mode values β€” the three constants that decide who runs STP on your bridge: userspace or the kernel, bestie πŸ’…


πŸŽ€ DESCRIPTION

okay so picture this: your bridge has STP turned on, and the kernel needs to know who's actually driving β€” a userspace daemon or the kernel itself. These are the values that answer that question. There are exactly three, and they are iconic ✨

πŸ’– BR_STP_MODE_AUTO

This one's the default, no cap. The kernel goes and invokes the /sbin/bridge-stp helper so it can hand the bridge over to a userspace STP daemon (think mstpd and friends 🧚).

🫢 tiny little caveat: this is only attempted in the initial network namespace. In any other network namespace it falls back to kernel STP. iykyk

πŸ’œ BR_STP_MODE_USER

Directly enable userspace STP (BR_USER_STP) without invoking the /sbin/bridge-stp helper. Snip snip, no middleman πŸ”₯

This one works in any network namespace, which is lowkey the whole point.

⚠️ heads up bestie: userspace is responsible for making sure an STP daemon is actually managing the bridge. Nobody's gonna do it for you.

πŸ¦‹ BR_STP_MODE_KERNEL

Directly enable kernel STP (BR_KERNEL_STP) without invoking the helper. Just you and the kernel, no daemons, no drama πŸ’€


🌸 the vibe check on all three

The mode controls how the bridge selects between userspace and kernel STP when STP is enabled via IFLA_BR_STP_STATE.

🚨 but listen β€” it can only be changed while STP is disabled, so IFLA_BR_STP_STATE == 0. Try it any other time and it returns -EBUSY. periodt.

And yeah, the default value is BR_STP_MODE_AUTO (we said that already but it bears repeating okay 😭).


πŸ‘€ SEE ALSO

  • Kernel file ./include/uapi/linux/if_link.h struct rtnl_link_stats64(9)
  • Bridge enum definition(9)
  • Bridge mode enum definition(9)
  • Bridge port enum definition(9)

that's the whole page, bestie β€” go forth and bridge responsibly 🫢

this gem lives at ./include/uapi/linux, dated October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from