This patch renames the get_bool() function, implemented in the
bird4-lib.sh and bird6-lib.sh files (respectively, for the IPv4 and
the IPv6 versions of the package), as well as all the calls to it.
This way, we avoid a function name collision with the one provided by
file /lib/functions.sh, which is slightly different and caused an
out-of-memory error when parsing the bird4/bird6 UCI config files.
Fixes #920.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
PKG_IPV4_NAME := $(BIRD1_IPV4_PKG)-openwrt
PKG_IPV6_NAME := $(BIRD1_IPV6_PKG)-openwrt
PKG_VERSION := 0.3
PKG_IPV4_NAME := $(BIRD1_IPV4_PKG)-openwrt
PKG_IPV6_NAME := $(BIRD1_IPV6_PKG)-openwrt
PKG_VERSION := 0.3
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE := GPL-3.0-or-later
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE := GPL-3.0-or-later
-# Function: get_bool $1 $2
+# Function: get_a_bool $1 $2
# $1 boolean. $2 string
# This function uses the external UCI function "config_get_bool $result $section $option" to obtain a boolean value from UCI config file.
# To use this function, use the same name of the UCI option for the variable $1.
# Example: UCI (option use_ipv6 '1'); local use_ipv6; get use_ipv6 $section
# $1 boolean. $2 string
# This function uses the external UCI function "config_get_bool $result $section $option" to obtain a boolean value from UCI config file.
# To use this function, use the same name of the UCI option for the variable $1.
# Example: UCI (option use_ipv6 '1'); local use_ipv6; get use_ipv6 $section
+# Note: this function was originally called get_bool(), but it collided with
+# the get_bool() function provided by /lib/functions.sh. Read more at
+# https://github.com/openwrt/routing/issues/920.
+get_a_bool() {
config_get_bool $1 $2 $1
}
config_get_bool $1 $2 $1
}
local disabled; local table; local kernel_table; local import; local export
local scan_time; local persist; local learn
local disabled; local table; local kernel_table; local import; local export
local scan_time; local persist; local learn
- get_bool disabled ${section}
+ get_a_bool disabled ${section}
get table ${section}
get import ${section}
get export ${section}
get table ${section}
get import ${section}
get export ${section}
local import_limit; local import_limit_action; local export_limit; local export_limit_action
local receive_limit; local receive_limit_action; local igp_table
local import_limit; local import_limit_action; local export_limit; local export_limit_action
local receive_limit; local receive_limit_action; local igp_table
- get_bool disabled ${section}
+ get_a_bool disabled ${section}
get table ${section}
get import ${section}
get export ${section}
get table ${section}
get import ${section}
get export ${section}
get neighbor_address ${section}
get neighbor_as ${section}
get neighbor_address ${section}
get neighbor_as ${section}
- get_bool next_hop_self ${section}
- get_bool next_hop_keep ${section}
+ get_a_bool next_hop_self ${section}
+ get_a_bool next_hop_keep ${section}
get rr_client ${section}
get rr_cluster_id ${section}
get rr_client ${section}
get rr_cluster_id ${section}
get receive_limit ${section}
get receive_limit_action ${section}
get receive_limit ${section}
get receive_limit_action ${section}
- get_bool next_hop_self ${section}
- get_bool next_hop_keep ${section}
+ get_a_bool next_hop_self ${section}
+ get_a_bool next_hop_keep ${section}
get rr_client ${section}
get rr_cluster_id ${section}
get rr_client ${section}
get rr_cluster_id ${section}
-# Function: get_bool $1 $2
+# Function: get_a_bool $1 $2
# $1 boolean. $2 string
# This function uses the external UCI function "config_get_bool $result $section $option" to obtain a boolean value from UCI config file.
# To use this function, use the same name of the UCI option for the variable $1.
# Example: UCI (option use_ipv6 '1'); local use_ipv6; get use_ipv6 $section
# $1 boolean. $2 string
# This function uses the external UCI function "config_get_bool $result $section $option" to obtain a boolean value from UCI config file.
# To use this function, use the same name of the UCI option for the variable $1.
# Example: UCI (option use_ipv6 '1'); local use_ipv6; get use_ipv6 $section
+# Note: this function was originally called get_bool(), but it collided with
+# the get_bool() function provided by /lib/functions.sh. Read more at
+# https://github.com/openwrt/routing/issues/920.
+get_a_bool() {
config_get_bool $1 $2 $1
}
config_get_bool $1 $2 $1
}
local disabled; local table; local kernel_table; local import; local export
local scan_time; local persist; local learn
local disabled; local table; local kernel_table; local import; local export
local scan_time; local persist; local learn
- get_bool disabled ${section}
+ get_a_bool disabled ${section}
get table ${section}
get import ${section}
get export ${section}
get table ${section}
get import ${section}
get export ${section}
local import_limit; local import_limit_action; local export_limit; local export_limit_action
local receive_limit; local receive_limit_action; local igp_table
local import_limit; local import_limit_action; local export_limit; local export_limit_action
local receive_limit; local receive_limit_action; local igp_table
- get_bool disabled ${section}
- get_bool next_hop_self ${section}
- get_bool next_hop_keep ${section}
+ get_a_bool disabled ${section}
+ get_a_bool next_hop_self ${section}
+ get_a_bool next_hop_keep ${section}
get table ${section}
get import ${section}
get export ${section}
get table ${section}
get import ${section}
get export ${section}