BRIDGE STP MODE VALUES(9)
π 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, soIFLA_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.hstructrtnl_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
- 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