From 203ee34d9c744815cfa0d604dc81fe9c5de688d5 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:04:35 +0100 Subject: [PATCH 01/11] batman-adv: Drop unused compat-hacks.patch The linux/build_bug.h is already provided by mac80211's backports. It is not needed anymore to adjust the includes to use the older linux/bug.h Signed-off-by: Sven Eckelmann --- batman-adv/patches/0001-compat-hacks.patch | 33 ---------------------- 1 file changed, 33 deletions(-) delete mode 100644 batman-adv/patches/0001-compat-hacks.patch diff --git a/batman-adv/patches/0001-compat-hacks.patch b/batman-adv/patches/0001-compat-hacks.patch deleted file mode 100644 index 0a9994d..0000000 --- a/batman-adv/patches/0001-compat-hacks.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/net/batman-adv/main.c -+++ b/net/batman-adv/main.c -@@ -19,7 +19,7 @@ - #include "main.h" - - #include --#include -+#include - #include - #include - #include ---- a/net/batman-adv/tp_meter.c -+++ b/net/batman-adv/tp_meter.c -@@ -20,7 +20,7 @@ - #include "main.h" - - #include --#include -+#include - #include - #include - #include ---- a/net/batman-adv/translation-table.c -+++ b/net/batman-adv/translation-table.c -@@ -21,7 +21,7 @@ - - #include - #include --#include -+#include - #include - #include - #include From 502d1232f70ab9d157ea2ec8c8e377a814522f13 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:19:42 +0100 Subject: [PATCH 02/11] batman-adv: Drop redefinition of NL80211_STA_INFO_EXPECTED_THROUGHPUT NL80211_STA_INFO_EXPECTED_THROUGHPUT is defined by the mac80211 package and doesn't have to be redefined in the compat-hacks.h. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 718a15c..748ba1d 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -36,11 +36,6 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) -/* for batadv_v_elp_get_throughput which would have used - * STATION_INFO_EXPECTED_THROUGHPUT in Linux 4.0.0 - */ -#define NL80211_STA_INFO_EXPECTED_THROUGHPUT 28 - /* wild hack for batadv_getlink_net only */ #define get_link_net get_xstats_size || 1 ? fallback_net : (struct net*)netdev->rtnl_link_ops->get_xstats_size From 89bc1bc1a14c1574881bff7e5522b56969c9de4c Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:19:42 +0100 Subject: [PATCH 03/11] batman-adv: Drop compat-hack for netif_trans_update netif_trans_update is already defined by the mac80211's backports and doesn't have to be redefined in the compat-hacks.h. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 748ba1d..217f4d1 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -104,20 +104,6 @@ batadv_ethtool_get_link_ksettings(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 6, 0) */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) - -#ifdef netif_trans_update -#undef netif_trans_update -#endif - -#define netif_trans_update batadv_netif_trans_update -static inline void batadv_netif_trans_update(struct net_device *dev) -{ - dev->trans_start = jiffies; -} - -#endif /* < KERNEL_VERSION(4, 7, 0) */ - #include_next From 3f0a7c48803931f97f227f4b85799e8e19666fe8 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:19:42 +0100 Subject: [PATCH 04/11] batman-adv: Drop compat-hack for nla_put_u64_64bit nla_put_u64_64bit is already defined by the mac80211's backports and doesn't have to be redefined in the compat-hacks.h. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 93 ----------------------------------- 1 file changed, 93 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 217f4d1..c2e6e31 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -105,99 +105,6 @@ batadv_ethtool_get_link_ksettings(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 6, 0) */ -#include_next - -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) - -#include_next - -static inline bool batadv_nla_need_padding_for_64bit(struct sk_buff *skb); - -static inline int batadv_nla_align_64bit(struct sk_buff *skb, int padattr) -{ - if (batadv_nla_need_padding_for_64bit(skb) && - !nla_reserve(skb, padattr, 0)) - return -EMSGSIZE; - - return 0; -} - -static inline struct nlattr *batadv__nla_reserve_64bit(struct sk_buff *skb, - int attrtype, - int attrlen, int padattr) -{ - if (batadv_nla_need_padding_for_64bit(skb)) - batadv_nla_align_64bit(skb, padattr); - - return __nla_reserve(skb, attrtype, attrlen); -} - -static inline void batadv__nla_put_64bit(struct sk_buff *skb, int attrtype, - int attrlen, const void *data, - int padattr) -{ - struct nlattr *nla; - - nla = batadv__nla_reserve_64bit(skb, attrtype, attrlen, padattr); - memcpy(nla_data(nla), data, attrlen); -} - -static inline bool batadv_nla_need_padding_for_64bit(struct sk_buff *skb) -{ -#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS - /* The nlattr header is 4 bytes in size, that's why we test - * if the skb->data _is_ aligned. A NOP attribute, plus - * nlattr header for next attribute, will make nla_data() - * 8-byte aligned. - */ - if (IS_ALIGNED((unsigned long)skb_tail_pointer(skb), 8)) - return true; -#endif - return false; -} - -static inline int batadv_nla_total_size_64bit(int payload) -{ - return NLA_ALIGN(nla_attr_size(payload)) -#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS - + NLA_ALIGN(nla_attr_size(0)) -#endif - ; -} - -static inline int batadv_nla_put_64bit(struct sk_buff *skb, int attrtype, - int attrlen, const void *data, - int padattr) -{ - size_t len; - - if (batadv_nla_need_padding_for_64bit(skb)) - len = batadv_nla_total_size_64bit(attrlen); - else - len = nla_total_size(attrlen); - if (unlikely(skb_tailroom(skb) < len)) - return -EMSGSIZE; - - batadv__nla_put_64bit(skb, attrtype, attrlen, data, padattr); - return 0; -} - -#ifdef nla_put_u64_64bit -#undef nla_put_u64_64bit -#endif - -#define nla_put_u64_64bit(_skb, _attrtype, _value, _padattr) \ - batadv_nla_put_u64_64bit(_skb, _attrtype, _value, _padattr) -static inline int batadv_nla_put_u64_64bit(struct sk_buff *skb, int attrtype, - u64 value, int padattr) -{ - return batadv_nla_put_64bit(skb, attrtype, sizeof(u64), &value, - padattr); -} - -#endif /* < KERNEL_VERSION(4, 7, 0) */ - - #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) #include_next From ae9c14e8b0af5df9fee0dcd84063c588b9e37bf9 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:19:42 +0100 Subject: [PATCH 05/11] batman-adv: Drop compat-hack for skb_put* skb_put* is already defined by the mac80211's backports and doesn't have to be redefined in the compat-hacks.h. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 42 ----------------------------------- 1 file changed, 42 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index c2e6e31..321ad6d 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -138,48 +138,6 @@ batadv_ethtool_get_link_ksettings(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 11, 9) */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) - -static inline void *batadv_skb_put(struct sk_buff *skb, unsigned int len) -{ - return (void *)skb_put(skb, len); -} -#ifdef skb_put -#undef skb_put -#endif - -#define skb_put batadv_skb_put - -static inline void *batadv_skb_put_zero(struct sk_buff *skb, unsigned int len) -{ - void *tmp = skb_put(skb, len); - - memset(tmp, 0, len); - - return tmp; -} -#ifdef skb_put_zero -#undef skb_put_zero -#endif - -#define skb_put_zero batadv_skb_put_zero - -static inline void *batadv_skb_put_data(struct sk_buff *skb, const void *data, - unsigned int len) -{ - void *tmp = skb_put(skb, len); - - memcpy(tmp, data, len); - - return tmp; -} -#ifdef skb_put_data -#undef skb_put_data -#endif - -#define skb_put_data batadv_skb_put_data - -#endif /* < KERNEL_VERSION(4, 13, 0) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) From df9d2719fa6ab0fd37c4396d6cc593d488eea546 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:19:42 +0100 Subject: [PATCH 06/11] batman-adv: Drop compat-hack for from_timer from_timer is already defined by the mac80211's backports and doesn't have to be redefined in the compat-hacks.h. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 321ad6d..5733d69 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -146,24 +146,6 @@ batadv_ethtool_get_link_ksettings(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 15, 0) */ -#ifndef from_timer - -#define TIMER_DATA_TYPE unsigned long -#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) - -static inline void timer_setup(struct timer_list *timer, - void (*callback)(struct timer_list *), - unsigned int flags) -{ - __setup_timer(timer, (TIMER_FUNC_TYPE)callback, - (TIMER_DATA_TYPE)timer, flags); -} - -#define from_timer(var, callback_timer, timer_fieldname) \ - container_of(callback_timer, typeof(*var), timer_fieldname) - -#endif /* !from_timer */ - #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) From fc37a1aa4d058bcfc0dba7a85432d6515db4cd19 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:19:42 +0100 Subject: [PATCH 07/11] batman-adv: Drop compat-hack for __poll_t __poll_t is already defined by the mac80211's backports and doesn't have to be redefined in the compat-hacks.h. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 5733d69..85c57be 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -167,13 +167,6 @@ static inline int batadv_cfg80211_get_station(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 18, 0) */ - -#ifdef __CHECK_POLL -typedef unsigned __bitwise __poll_t; -#else -typedef unsigned __poll_t; -#endif - #endif /* < KERNEL_VERSION(4, 16, 0) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) From ad27ee7f9a2973dde6c04f3a17f9a9ca97b48248 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 20:40:11 +0100 Subject: [PATCH 08/11] batman-adv: Drop cfg80211_get_station memset workaround The actual memset fix for cfg80211_get_station's sinfo is already part of the mac80211 package and doesn't have to be shipped anymore with batman-adv. Signed-off-by: Sven Eckelmann --- batman-adv/src/compat-hacks.h | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 85c57be..cfeb348 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -146,28 +146,6 @@ batadv_ethtool_get_link_ksettings(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 15, 0) */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) - - -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) - -#include - -/* cfg80211 fix: https://patchwork.kernel.org/patch/10449857/ */ -static inline int batadv_cfg80211_get_station(struct net_device *dev, - const u8 *mac_addr, - struct station_info *sinfo) -{ - memset(sinfo, 0, sizeof(*sinfo)); - return cfg80211_get_station(dev, mac_addr, sinfo); -} - -#define cfg80211_get_station(dev, mac_addr, sinfo) \ - batadv_cfg80211_get_station(dev, mac_addr, sinfo) - -#endif /* < KERNEL_VERSION(4, 18, 0) */ - -#endif /* < KERNEL_VERSION(4, 16, 0) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) From 7d973599eff3a3c52eb558823da1329e311f75f4 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 21:47:40 +0100 Subject: [PATCH 09/11] batman-adv: use batctl for configuration of gw_mode The batctl tool should be used for modifying settings in the batman-adv driver to keep the scripts consistent and allow to use the correct way of communicating with the kernel (sysfs vs. netlink). The gw_mode, gw_bandwidth and gw_sel_class options are all handled by the same gw_mode command in batctl and thus have to be combined depending on the "gw_mode" value. Signed-off-by: Sven Eckelmann --- batman-adv/Makefile | 2 +- batman-adv/files/lib/batman-adv/config.sh | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 9ad8210..b47e3b6 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:=0 +PKG_RELEASE:=1 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 3d6b884..a74c9d8 100644 --- a/batman-adv/files/lib/batman-adv/config.sh +++ b/batman-adv/files/lib/batman-adv/config.sh @@ -40,9 +40,26 @@ bat_config() [ -n "$distributed_arp_table" ] && batctl -m "$mesh" distributed_arp_table "$distributed_arp_table" 2>&- [ -n "$fragmentation" ] && batctl -m "$mesh" fragmentation "$fragmentation" - [ -n "$gw_bandwidth" ] && echo $gw_bandwidth > /sys/class/net/$mesh/mesh/gw_bandwidth - [ -n "$gw_mode" ] && echo $gw_mode > /sys/class/net/$mesh/mesh/gw_mode - [ -n "$gw_sel_class" ] && echo $gw_sel_class > /sys/class/net/$mesh/mesh/gw_sel_class + case "$gw_mode" in + server) + if [ -n "$gw_bandwidth" ]; then + batctl -m "$mesh" gw_mode "server" "$gw_bandwidth" + else + batctl -m "$mesh" gw_mode "server" + fi + ;; + client) + if [ -n "$gw_sel_class" ]; then + batctl -m "$mesh" gw_mode "client" "$gw_sel_class" + else + batctl -m "$mesh" gw_mode "client" + fi + ;; + *) + batctl -m "$mesh" gw_mode "off" + ;; + esac + [ -n "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty [ -n "$isolation_mark" ] && batctl -m "$mesh" isolation_mark "$isolation_mark" From 278e98cb868b8983fc57aa06004384ac75c9f531 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 22:31:44 +0100 Subject: [PATCH 10/11] batctl: Add support for hop_penalty settings command The batman-adv scripts are still using sysfs for setting the hop_penalty. Since the sysfs is deprecated, the batctl interface should be used to make it independent of implementation details (sysfs vs. netlink). Signed-off-by: Sven Eckelmann --- batctl/Makefile | 4 +- .../0001-batctl-Add-hop_penalty-command.patch | 59 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 batctl/patches/0001-batctl-Add-hop_penalty-command.patch diff --git a/batctl/Makefile b/batctl/Makefile index 5c1c20e..84a456c 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batctl PKG_VERSION:=2019.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_HASH:=997721096ff396644e8d697ea7651e9d38243faf317bcea2661d4139ff58b531 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -101,6 +101,7 @@ config-n := \ fragmentation \ gateways \ gw_mode \ + hop_penalty \ interface \ isolation_mark \ log \ @@ -130,6 +131,7 @@ config-settings := \ distributed_arp_table \ fragmentation \ gw_mode \ + hop_penalty \ interface \ isolation_mark \ loglevel \ diff --git a/batctl/patches/0001-batctl-Add-hop_penalty-command.patch b/batctl/patches/0001-batctl-Add-hop_penalty-command.patch new file mode 100644 index 0000000..ae95f87 --- /dev/null +++ b/batctl/patches/0001-batctl-Add-hop_penalty-command.patch @@ -0,0 +1,59 @@ +From: Sven Eckelmann +Date: Fri, 22 Feb 2019 22:19:59 +0100 +Subject: batctl: Add hop_penalty command + +Signed-off-by: Sven Eckelmann + +diff --git a/Makefile b/Makefile +index 4d8b7095a1e307f0dde7660a718e4ad9c6b11102..55105cc754f546891ba2fcaf57dc8b3ac4c22f71 100755 +--- a/Makefile ++++ b/Makefile +@@ -63,6 +63,7 @@ $(eval $(call add_command,event,y)) + $(eval $(call add_command,fragmentation,y)) + $(eval $(call add_command,gateways,y)) + $(eval $(call add_command,gw_mode,y)) ++$(eval $(call add_command,hop_penalty,y)) + $(eval $(call add_command,interface,y)) + $(eval $(call add_command,isolation_mark,y)) + $(eval $(call add_command,log,y)) +diff --git a/hop_penalty.c b/hop_penalty.c +new file mode 100644 +index 0000000000000000000000000000000000000000..6e6a06a661e2ffbb76793116fb214396523bbd8d +--- /dev/null ++++ b/hop_penalty.c +@@ -0,0 +1,35 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* Copyright (C) 2009-2019 B.A.T.M.A.N. contributors: ++ * ++ * Marek Lindner ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of version 2 of the GNU General Public ++ * License as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++ * 02110-1301, USA ++ * ++ * License-Filename: LICENSES/preferred/GPL-2.0 ++ */ ++ ++#include ++ ++#include "main.h" ++#include "sys.h" ++ ++static struct settings_data batctl_settings_hop_penalty = { ++ .sysfs_name = "hop_penalty", ++ .params = NULL, ++}; ++ ++COMMAND_NAMED(SUBCOMMAND, hop_penalty, "hp", handle_sys_setting, ++ COMMAND_FLAG_MESH_IFACE, &batctl_settings_hop_penalty, ++ "[penalty] \tdisplay or modify hop_penalty setting"); From 5882b6049dd44647f3b59f130bf0c5bd2a58e3ac Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 22 Feb 2019 21:47:40 +0100 Subject: [PATCH 11/11] 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>&-