From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer <michael.tremer@ipfire.org> 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 13:44:54 +0000 Message-ID: <338E6DBF-7808-4FF1-8538-A6FBE27E2D0E@ipfire.org> In-Reply-To: <5ef263d0-d1b5-f19b-e839-ce3dfc01933a@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6199197994421696575==" List-Id: <development.lists.ipfire.org> --===============6199197994421696575== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This patch is fine and does not need to be changed. I will merge it for now and you will then send a second patch at a later time= that extends the web UI to configure STP. Best, -Michael > On 20 Nov 2020, at 11:36, Daniel Weism=C3=BCller <daniel.weismueller(a)ipfi= re.org> wrote: >=20 > Am 20.11.2020 um 11:55 schrieb Michael Tremer: >> Hi, >>=20 >>> On 20 Nov 2020, at 06:58, Daniel Weism=C3=BCller <daniel.weismueller(a)ip= fire.org> wrote: >>>=20 >>> Hello, >>>=20 >>> In my opinion it is sufficient to be able to set these parameters via com= mand line. >> Why is that? IPFire is a distribution that is supposed to be managed entir= ely by the web user interface. >=20 > Ok I'll revise the script. >=20 >=20 >>> It should only be made sure that the settings are persitend and not overw= ritten by a reboot or the webif. >> They won=E2=80=99t be as they are in /var/ipfire/ethernet/settings. >>=20 >> Best, >> -Michael >>=20 >>> - >>> Daniel >>>=20 >>> Am 19.11.2020 um 15:56 schrieb Michael Tremer: >>>> Hello Daniel, >>>>=20 >>>> This patch looks good to me. >>>>=20 >>>> I had assumed that we automatically enabled STP on all bridges, but appa= rently we do not. >>>>=20 >>>> How do we process with this? >>>>=20 >>>> I suppose it is not the most user-friendly way to ask the user to edit t= he configuration file. This either must be documented somewhere or the zoneco= nfig.cgi script needs to be extended to allow enabling STP. >>>>=20 >>>> Does anyone want to be able to change any STP parameters like priority o= r cost of the ports? >>>>=20 >>>> Best, >>>> -Michael >>>>=20 >>>>> On 19 Nov 2020, at 13:18, Daniel Weism=C3=BCller <daniel.weismueller(a)= ipfire.org> wrote: >>>>>=20 >>>>> Signed-off-by: Daniel Weism=C3=BCller <daniel.weismueller(a)ipfire.org> >>>>> --- >>>>> 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-= 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")" >>>>>=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 --===============6199197994421696575==--