From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel =?utf-8?q?Weism=C3=BCller?= 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: Fri, 20 Nov 2020 08:40:36 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4426214687597030444==" List-Id: --===============4426214687597030444== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Of course I mean the additional settings. ;-) The possibility to activate STP via webif should be given in any case. Am 20.11.2020 um 07:58 schrieb Daniel Weism=C3=BCller: > Hello, > > In my opinion it is sufficient to be able to set these parameters via=20 > command line. > > It should only be made sure that the settings are persitend and not=20 > overwritten by a reboot or the webif. > > - > Daniel > > Am 19.11.2020 um 15:56 schrieb Michael Tremer: >> Hello Daniel, >> >> This patch looks good to me. >> >> I had assumed that we automatically enabled STP on all bridges, but=20 >> apparently we do not. >> >> How do we process with this? >> >> I suppose it is not the most user-friendly way to ask the user to=20 >> edit the configuration file. This either must be documented somewhere=20 >> 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=20 >> priority or cost of the ports? >> >> Best, >> -Michael >> >>> On 19 Nov 2020, at 13:18, Daniel Weism=C3=BCller=20 >>> wrote: >>> >>> Signed-off-by: Daniel Weism=C3=BCller >>> --- >>> config/udev/network-hotplug-bridges | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/config/udev/network-hotplug-bridges=20 >>> b/config/udev/network-hotplug-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")" >>> >>> # The name of the virtual bridge >>> BRIDGE=3D"$(get_value "${ZONE}_DEV")" >>> +STP=3D"$(get_value "${ZONE}_STP")" >>> >>> case "${MODE}" in >>> =C2=A0=C2=A0=C2=A0=C2=A0bridge) >>> @@ -89,7 +90,8 @@ case "${MODE}" in >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # We need to create the bridge= if it doesn't exist, yet >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [ ! -d "/sys/class/net/${BR= IDGE}" ]; then >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ip li= nk add "${BRIDGE}" address "${ADDRESS}" type bridge >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ip li= nk add "${BRIDGE}" address "${ADDRESS}" type bridge \ >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 $([ "${STP}" =3D "on" ] && echo "stp_state 1") >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #ip li= nk set "${BRIDGE}" up >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi >>> >>> --=20 >>> 2.28.0 >>> --===============4426214687597030444==--