diff --git a/batman-adv/files/lib/netifd/proto/batadv.sh b/batman-adv/files/lib/netifd/proto/batadv.sh index 632a209..201084a 100644 --- a/batman-adv/files/lib/netifd/proto/batadv.sh +++ b/batman-adv/files/lib/netifd/proto/batadv.sh @@ -4,6 +4,12 @@ . ../netifd-proto.sh init_proto "$@" +bat_load_module() +{ + [ -d "/sys/module/batman_adv/" ] && return + load_modules /etc/modules.d/*-crc16 /etc/modules.d/*-crypto* /etc/modules.d/*-lib-crc* /etc/modules.d/*-batman-adv* +} + proto_batadv_init_config() { proto_config_add_string "mesh" } @@ -15,6 +21,8 @@ proto_batadv_setup() { local mesh json_get_vars mesh + bat_load_module + echo "$mesh" > "/sys/class/net/$iface/batman_adv/mesh_iface" proto_init_update "$iface" 1 proto_send_update "$config" diff --git a/batman-adv/files/lib/netifd/proto/batmesh.sh b/batman-adv/files/lib/netifd/proto/batmesh.sh index 2038739..ba6e783 100755 --- a/batman-adv/files/lib/netifd/proto/batmesh.sh +++ b/batman-adv/files/lib/netifd/proto/batmesh.sh @@ -4,12 +4,6 @@ . ../netifd-proto.sh init_proto "$@" -bat_load_module() -{ - [ -d "/sys/module/batman_adv/" ] && return - load_modules /etc/modules.d/*-crc16 /etc/modules.d/*-crypto* /etc/modules.d/*-lib-crc* /etc/modules.d/*-batman-adv* -} - proto_batmesh_init_config() { proto_config_add_string "aggregated_ogms" proto_config_add_string "ap_isolation"