From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] Core 152: the script "network-hotplug-bridges" now reads the variable ${ZONE}_STP from /var/ipfire/ethernet/settings so that STP can be turned on and off for each bridge Date: Thu, 19 Nov 2020 14:56:19 +0000 Message-ID: <6126BB16-DC05-45C1-8141-8C0EEF74EEA9@ipfire.org> In-Reply-To: <20201119131848.596-1-daniel.weismueller@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7516889008698684361==" List-Id: --===============7516889008698684361== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Daniel, This patch looks good to me. I had assumed that we automatically enabled STP on all bridges, but apparentl= y we do not. How do we process with this? I suppose it is not the most user-friendly way to ask the user to edit the co= nfiguration file. This either must be documented somewhere or the zoneconfig.= cgi script needs to be extended to allow enabling STP. Does anyone want to be able to change any STP parameters like priority or cos= t of the ports? Best, -Michael > On 19 Nov 2020, at 13:18, Daniel Weism=C3=BCller wrote: >=20 > Signed-off-by: Daniel Weism=C3=BCller > --- > config/udev/network-hotplug-bridges | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotp= lug-bridges > index 33d6d65ba..7431377bb 100644 > --- a/config/udev/network-hotplug-bridges > +++ b/config/udev/network-hotplug-bridges > @@ -81,6 +81,7 @@ MODE=3D"$(get_value "${ZONE}_MODE")" >=20 > # The name of the virtual bridge > BRIDGE=3D"$(get_value "${ZONE}_DEV")" > +STP=3D"$(get_value "${ZONE}_STP")" >=20 > case "${MODE}" in > bridge) > @@ -89,7 +90,8 @@ case "${MODE}" in >=20 > # We need to create the bridge if it doesn't exist, yet > if [ ! -d "/sys/class/net/${BRIDGE}" ]; then > - ip link add "${BRIDGE}" address "${ADDRESS}" type bridge > + ip link add "${BRIDGE}" address "${ADDRESS}" type bridge \ > + $([ "${STP}" =3D "on" ] && echo "stp_state 1") > #ip link set "${BRIDGE}" up > fi >=20 > --=20 > 2.28.0 >=20 --===============7516889008698684361==--