diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-09-08 12:50:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-13 11:21:31 -0400 |
commit | 308433155a67cb097142292c8943e0aa8d1a1c79 (patch) | |
tree | e9334e5218ca665c10cf09bdf67f73e1be5db26a /net/tipc | |
parent | 4c73195edbe3a5d7e14ea549bb261cf35c29f0cc (diff) | |
download | linux-308433155a67cb097142292c8943e0aa8d1a1c79.tar.gz linux-308433155a67cb097142292c8943e0aa8d1a1c79.tar.bz2 linux-308433155a67cb097142292c8943e0aa8d1a1c79.zip |
net: bridge: add helper to call /sbin/bridge-stp
If /sbin/bridge-stp is available on the system, bridge tries to execute
it instead of the kernel implementation when starting/stopping STP.
If anything goes wrong with /sbin/bridge-stp, bridge silently falls back
to kernel STP, making hard to debug userspace STP.
This patch adds a br_stp_call_user helper to start/stop userspace STP
and debug errors from the program: abnormal exit status is stored in the
lower byte and normal exit status is stored in higher byte.
Below is a simple example on a kernel with dynamic debug enabled:
# ln -s /bin/false /sbin/bridge-stp
# brctl stp br0 on
br0: failed to start userspace STP (256)
# dmesg
br0: /sbin/bridge-stp exited with code 1
br0: failed to start userspace STP (256)
br0: using kernel STP
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions