The alfred daemon allows to be started with multiple interfaces. The first
interface is used for communication and to calculate the source mac
address. The rest of the interfaces are only used for communication.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
PKG_NAME:=alfred
PKG_VERSION:=2019.3
PKG_NAME:=alfred
PKG_VERSION:=2019.3
PKG_HASH:=a4c37920de497701680abb55c49cdcd11e4e7135e0e7e79259c35492a3df4766
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=a4c37920de497701680abb55c49cdcd11e4e7135e0e7e79259c35492a3df4766
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- option interface 'br-lan'
+ list interface 'br-lan'
option mode 'master'
option batmanif 'bat0'
option start_vis '1'
option mode 'master'
option batmanif 'bat0'
option start_vis '1'
+append_interface()
+{
+ append "interfaces" "$1" ","
+ wait_for_ll_address "$1"
+}
+
alfred_start() {
local args=""
local section="$1"
local disabled interface mode
alfred_start() {
local args=""
local section="$1"
local disabled interface mode
# check if section is disabled
config_get_bool disabled "$section" disabled 0
# check if section is disabled
config_get_bool disabled "$section" disabled 0
- config_get interface "$section" interface
- append args "-i $interface"
+ config_list_foreach "$section" "interface" append_interface
+ if [ -z "$interfaces" ]; then
+ config_get interface "$section" interface
+ append_interface "$interface"
+ fi
+ append args "-i $interfaces"
config_get mode "$section" mode
[ "$mode" = "master" ] && append args "-m"
config_get mode "$section" mode
[ "$mode" = "master" ] && append args "-m"
wait_for_dir "$batmanif" "/sys/class/net/$batmanif/mesh"
fi
wait_for_dir "$batmanif" "/sys/class/net/$batmanif/mesh"
fi
- wait_for_ll_address "$interface"
-
append alfred_args "$args"
enable=1
append alfred_args "$args"
enable=1