batman-adv: Provide teardown hook for batadv_vlan proto The batadv_vlan proto doesn't need to do anything when it gets teared down. But the scripts are still trying to call the teardown function of this proto. This results in warnings like: daemon.notice netifd: batmesh1 (18940): ./batadv_vlan.sh: eval: line 37: proto_batadv_vlan_teardown: not found Just providing a stub function avoids this log spam. Fixes: #1044 Reported-by: Rani Hod <rani.hod@gmail.com> Fixes: f5205d7d2434 ("batman-adv: upgrade package to latest release 2014.2.0") Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: update to version 2024.0 * support latest kernels (4.19 - 6.8) * coding style cleanups and refactoring * add stateless multicast packet format support Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: compat: Fix skb_vlan_eth_hdr conflict in stable kernels The newest Linux stable kernel releases: * v5.10.205 * v5.15.144 * v6.1.69 received a backported version of commit 1f5020acb33f ("net: vlan: introduce skb_vlan_eth_hdr()"). batman-adv must therefore not provide this function any longer for these kernel versions. Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: update to version 2023.3 * support latest kernels (4.14 - 6.7) * coding style cleanups and refactoring * only warn about too small MTU when soft interfaces wasn't already reduced * bugs squashed: - Hold rtnl lock during MTU update via netlink Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: Fix lock assert after fragmentation change The automatic recalculation of the maximum allowed MTU is usually triggered by code sections which are already rtnl lock protected by callers outside of batman-adv. But when the fragmentation setting is changed via batman-adv's own batadv genl family, then the rtnl lock is not yet taken. But dev_set_mtu requires that the caller holds the rtnl lock because it uses netdevice notifiers. And this code will then fail the check for this lock: RTNL: assertion failed at net/core/dev.c (1953) Fixes: e7ee4c55ded3 ("batman-adv: update to version 2023.2") Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: update to version 2023.2 * support latest kernels (4.14 - 6.5) * bugs squashed: - avoid potential invalid memory access when processing ELP/OGM2 packets - drop pending DAT worker when interface shuts down - inform network stack about automatically adjusted MTUs - keep user defined MTU limit when MTU is recalculated - fix packet memory leak when sending OGM2 via inactive interfaces - fix TT memory leak for roamed back clients Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: Drop support for kernel < 5.15 OpenWrt master is no longer providing any kernels older than 5.15. Just drop the compat-hacks/patches for older kernels to make it easier to maintain the package. Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: update to version 2023.1 * support latest kernels (4.14 - 6.4) * drop single unicast transfer optimization for unsnoopable IP addresses * prepare infrastructure for multicast packets with multiple unicast destination addresses Signed-off-by: Sven Eckelmann <sven@narfation.org>
treewide: remove AUTORELEASE OpenWrt/packages removed AUTORELEASE treewide. Remove it also in the routing feed. This is just copied from [0] with modification to the sed cmd because it was not working for the routing feed: The following temporary change was made to the core: diff --git a/rules.mk b/rules.mk index 57d7995d4fa8..f16367de87a8 100644 --- a/rules.mk +++ b/rules.mk @@ -429,7 +429,7 @@ endef abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1)))) COMMITCOUNT = $(if $(DUMP),0,$(call commitcount)) -AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1)) +AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile)) all: FORCE: ; And this command used to fix affected packages: for i in $(cd feeds/routing; git grep -l PKG_RELEASE:=.*AUTORELEASE | \ sed 's/\/Makefile$//';); do make package/$i/download done [0] - https://github.com/openwrt/packages/commit/0c10c224be81f9221dabfab449855ab6718d2a0c Signed-off-by: Nick Hainke <vincent@systemli.org>
batman-adv: fix compilation bug in batadv_is_cfg80211_netdev() Because batman-adv is built under backports, not a clean linux tree, the CONFIG_CFG80211 does not exist. The evaluation of IS_ENABLED() in batadv_is_cfg80211_netdev() will be false, causing the funtion to always return false. This means that the wifi_flags of an interface don't get set, causing batadv_is_wifi_hardif() to always return false. As a result, batadv_v_elp_get_throughput() never tries to get the station info from cfg80211, resulting in the following warning: batman_adv: bat0: WiFi driver or ethtool info does not provide information about link speeds on interface phy1-mesh0, therefore defaulting to hardcoded throughput values of 1.0 Mbps. So replace CONFIG_CFG80211 with CPTCFG_CFG80211, which is the correct macro to use under backports. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
batman-adv: update to version 2022.3 * support latest kernels (4.9 - 6.1) * coding style cleanups and refactoring * bugs squashed: - limit the minimum MTU of hard-interface to avoid "Forced to purge local tt entries" errors Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: Rebuild on CONFIG_BATMAN_ADV_* changes The buildsystem doesn't know that the KernelPackage/*/config kconfig symbols are related to the batman-adv package build. It is necessary to explicitly define it via PKG_CONFIG_DEPENDS. Fixes: 522ce8dfdb7f ("batman-adv: rename folder name to match project & package name") Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: Fix build with kernel 5.15.38 The build failed in this kernel due to some missing implicit includes: build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h:64:42: warning: 'struct sk_buff' declared inside parameter list will not be visible outside of this definition or declaration 64 | static inline int batadv_netif_rx(struct sk_buff *skb) | ^~~~~~~ build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h: In function 'batadv_netif_rx': build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h:66:13: error: implicit declaration of function 'in_interrupt' [-Werror=implicit-function-declaration] 66 | if (in_interrupt()) | ^~~~~~~~~~~~ build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h:67:24: error: implicit declaration of function 'netif_rx' [-Werror=implicit-function-declaration] 67 | return netif_rx(skb); | ^~~~~~~~ build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h:69:24: error: implicit declaration of function 'netif_rx_ni' [-Werror=implicit-function-declaration] 69 | return netif_rx_ni(skb); | ^~~~~~~~~~~ In file included from <command-line>: ./include/linux/netdevice.h: At top level: build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h:71:18: error: conflicting types for 'batadv_netif_rx'; have 'int(struct sk_buff *)' 71 | #define netif_rx batadv_netif_rx | ^~~~~~~~~~~~~~~ ./include/linux/netdevice.h:4029:5: note: in expansion of macro 'netif_rx' 4029 | int netif_rx(struct sk_buff *skb); | ^~~~~~~~ build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/batman-adv-2022.1/compat-hacks.h:64:19: note: previous definition of 'batadv_netif_rx' with type 'int(struct sk_buff *)' 64 | static inline int batadv_netif_rx(struct sk_buff *skb) | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Reported-by: Chen Minqiang <ptpt52@gmail.com> Fixes: b65a8ca03aec ("batman-adv: update to version 2022.1") Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: update to version 2022.1 * support latest kernels (4.9 - 5.18) * bugs squashed: - resolve "time-of-check-time-of-use" race condition when checking the network namespace of a lower device - fix sanity check of network devices in different namespaces with colliding IDs - prevent transmission errors after splitting large GRO packets into smaller fragments Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: Drop unused compat patches The minimal kernel version in OpenWrt is now Linux 5.10.111. It already provides various thing which needed special patches on older versions. Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv: compat: Add atomic mc_forwarding support for stable kernels Eric Dumazet changed the mc_forwarding in commit 145c7a793838 ("ipv6: make mc_forwarding atomic") the type of mc_forwarding from __s32 to an atomic_t. This patch was then ported to various stable kernels. This code change caused a FTBFS when in batman-adv when CONFIG_BATMAN_ADV_MCAST was activated. To work around this problem, provide a version for kernels with __s32 mc_forwarding and a version for kernel with atomic_t mc_forwarding. Fixes: #850 Reported-by: Huangbin Zhan <zhanhb88@gmail.com> Signed-off-by: Sven Eckelmann <sven@narfation.org>