From 5882b6049dd44647f3b59f130bf0c5bd2a58e3ac Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 21:47:40 +0100 Subject: [PATCH] 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 --- batman-adv/Makefile | 2 +- batman-adv/files/lib/batman-adv/config.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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>&-