Merge pull request #132 from tcatm/babeld-config-lists
authorzorun <github@bitsofnetworks.org>
Sat, 22 Aug 2015 11:33:01 +0000 (13:33 +0200)
committerzorun <github@bitsofnetworks.org>
Sat, 22 Aug 2015 11:33:01 +0000 (13:33 +0200)
babeld: fix parsing of list import_table

babeld/files/babeld.config
babeld/files/babeld.init

index cb2a131150677fef2fb5655842f2948c4d53cdcd..0073f73f5667a49137a49fb48eb7f0edcde94a38 100644 (file)
@@ -16,8 +16,6 @@ config general
        ## Enable ipv6-subtrees by default since OpenWrt should ship with a
        ## recent enough kernel for it to work.
        option 'ipv6_subtrees' 'true'
-       ## This seems somewhat buggy on BB.  If you need only one
-       ## import-table statement, "option import_table 42" should work.
        # list 'import_table' '42'
        # list 'import_table' '100'
        ## Alternative configuration file and directory.
index 6796a34296c176faf0b1bd56721abb9fc02dda04..21ae4be3349b2f271fd285a7a4acfff623fedf89 100755 (executable)
@@ -166,6 +166,9 @@ babel_config_cb() {
                        local value="$2"
                        # Ignore old options
                        list_contains ignored_options "$option" && return
+                       # Skip lists. They will be taken care of by list_cb
+                       test "${option#*_ITEM}" != "$option" && return
+                       test "${option#*_LENGTH}" != "$option" && return
                        cfg_append "${option//_/-} $value"
                }
        ;;