From: Michael Tremer Date: Sat, 27 Dec 2014 20:25:05 +0000 (+0000) Subject: bridge-stp: Fix reading the STP configuration X-Git-Tag: 007~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52acd25f487f044c42a93dbdbba461e549370605;p=network.git bridge-stp: Fix reading the STP configuration --- diff --git a/src/functions/functions.zone b/src/functions/functions.zone index a7bf71f8..04b034d6 100644 --- a/src/functions/functions.zone +++ b/src/functions/functions.zone @@ -856,11 +856,19 @@ function zone_file() { function zone_settings_read() { local zone=${1} assert isset zone + shift + + local args + if [ $# -eq 0 ] && [ -n "${HOOK_SETTINGS}" ]; then + list_append args ${HOOK_SETTINGS} + else + list_append args $@ + fi # Save the HOOK variable. local hook="${HOOK}" - settings_read "${zone}" ${HOOK_SETTINGS} + settings_read "$(zone_file "${zone}")" ${args} # Restore hook. HOOK="${hook}" diff --git a/src/helpers/bridge-stp b/src/helpers/bridge-stp index 720324ca..b25af6a8 100644 --- a/src/helpers/bridge-stp +++ b/src/helpers/bridge-stp @@ -43,7 +43,8 @@ if ! zone_exists ${zone}; then fi # Read zone settings -zone_settings_read ${zone} +zone_settings_read "${zone}" --ignore-superfluous-settings \ + STP STP_MODE # Make sure STP is enabled for this zone. assert enabled STP