]> git.ipfire.org Git - people/ms/network.git/commitdiff
bridge-stp: Fix reading the STP configuration
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Dec 2014 20:25:05 +0000 (20:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Dec 2014 20:25:05 +0000 (20:25 +0000)
src/functions/functions.zone
src/helpers/bridge-stp

index a7bf71f8cdcd17ae3bb6eb65d8e4e83edfcb8e7b..04b034d6787a890059e3b7ae30ead69bf519d302 100644 (file)
@@ -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}"
index 720324cafdf7df8c9a2a1a7bbf1acfa965429ed7..b25af6a8acf65628763d85728e467b7bd141c33d 100644 (file)
@@ -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