-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #867 from kernelkit/stp
STP
- Loading branch information
Showing
37 changed files
with
966 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# A single mstpd instance can manage multiple bridges, which are | ||
# dynamically added/removed by the kernel via the /sbin/bridge-stp | ||
# usermode helper. We depend on usr/mstpd so that confd can | ||
# enable/disable the service without an initctl barrier, since it | ||
# needs to already be running when a bridge interface with spanning | ||
# tree enabled is created. | ||
service env:-/etc/default/mstpd <!usr/mstpd> \ | ||
[S0123456789] mstpd $MSTPD_ARGS -- Spanning Tree daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../available/mstpd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Daemon is managed by finit(1), /sbin/bridge-stp should assume that | ||
# it is already running and simply add/remove bridges as necessary | ||
MANAGE_MSTPD='n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -d: Do _not_ [sic] daemonize | ||
# -s: Log to syslog | ||
MSTPD_ARGS="-d -s" |
8 changes: 4 additions & 4 deletions
8
package/skeleton-init-finit/skeleton/etc/finit.d/available/mstpd.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Make sure to configure the bridge to run on before starting mstpd | ||
# Note: all 'sysv' type services are handed an extra 'start' or 'stop' | ||
# argument when starting and stopping. | ||
sysv name:mstpd [0123456] pid:!/run/mstpd.pid bridge-stp br0 -- MSTP daemon | ||
# A single mstpd instance can manage multiple bridges, which are | ||
# dynamically added/removed by the kernel via the /sbin/bridge-stp | ||
# usermode helper. | ||
service [S0123456789] env:-/etc/default/mstpd mstpd $MSTPD_ARGS -- Spanning Tree daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pkglibexec_SCRIPTS = bootstrap error load gen-service gen-hostname \ | ||
gen-interfaces gen-motd gen-hardware gen-version | ||
gen-interfaces gen-motd gen-hardware gen-version \ | ||
mstpd-wait-online | ||
sbin_SCRIPTS = dagger migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
# | ||
# Block until mstpd has opened its control socket | ||
|
||
set -e | ||
|
||
timeout=${1:-10} | ||
|
||
for _ in $(seq $((timeout * 10))); do | ||
ss -Haxn src '@.mstp_server*' | grep -q mstp_server && exit 0 | ||
sleep .1 | ||
done | ||
|
||
logger -I $$ -p user.error -t mstpd-wait-online \ | ||
"Timeout waiting for mstpd to start" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ MODULES=( | |
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"infix-interfaces@2024-11-27.yang -e vlan-filtering" | ||
"infix-interfaces@2025-01-08.yang -e vlan-filtering" | ||
|
||
# from rousette | ||
"[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- sh -*- | ||
# REMEMBER TO UPDATE infix-interfaces ALSO IN confd.inc | ||
MODULES=( | ||
"infix-interfaces@2024-11-27.yang -e vlan-filtering -e containers" | ||
"infix-interfaces@2025-01-08.yang -e vlan-filtering -e containers" | ||
"[email protected]" | ||
) |
Oops, something went wrong.