From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:47:40 +0000 (+0100) Subject: batman-adv: use batctl for configuration of hop_penalty X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F451%2Fhead;p=feed%2Frouting.git batman-adv: use batctl for configuration of hop_penalty hop_penalty is the last remaining setting which is directly writing to sysfs instead of using a implementation (sysfs vs. netlink) abstraction layer. batctl now provides a wrapper function that allows the script to directly use it to take care of communicating with the driver. Signed-off-by: Sven Eckelmann --- diff --git a/batman-adv/Makefile b/batman-adv/Makefile index b47e3b6..82af6c7 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv PKG_VERSION:=2019.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_HASH:=3e97d8a771cdbd7b2df42c52b88e071eaa58b5d28eb4e17a4b13b6698debbdc0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/batman-adv/files/lib/batman-adv/config.sh b/batman-adv/files/lib/batman-adv/config.sh index a74c9d8..952f93e 100644 --- a/batman-adv/files/lib/batman-adv/config.sh +++ b/batman-adv/files/lib/batman-adv/config.sh @@ -60,8 +60,7 @@ bat_config() ;; esac - [ -n "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty - + [ -n "$hop_penalty" ] && batctl -m "$mesh" hop_penalty "$hop_penalty" [ -n "$isolation_mark" ] && batctl -m "$mesh" isolation_mark "$isolation_mark" [ -n "$multicast_mode" ] && batctl -m "$mesh" multicast_mode "$multicast_mode" 2>&- [ -n "$network_coding" ] && batctl -m "$mesh" network_coding "$network_coding" 2>&-