batman-adv: update to version 2023.1
authorSven Eckelmann <sven@narfation.org>
Sat, 27 May 2023 10:09:02 +0000 (12:09 +0200)
committerSven Eckelmann <sven@narfation.org>
Sat, 27 May 2023 10:09:02 +0000 (12:09 +0200)
* 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>
batman-adv/Makefile
batman-adv/patches/0001-batman-adv-Fix-build-of-multicast-code-against-Linux.patch
batman-adv/src/compat-hacks.h

index 0d22a1e8cfad6507630320b7fd75db520205927b..bf419449aa4c4ca33b0b2836a45bd8082f69fa85 100644 (file)
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batman-adv
-PKG_VERSION:=2023.0
+PKG_VERSION:=2023.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
-PKG_HASH:=2ce4ec04063252e7bfec3a2b3fa2a61b3b42c7b04d698ba60132bfab1d60a5cd
+PKG_HASH:=f46a7286660a5ec3506a1be7ef60b471c51ac70550597d598040479ab7b936b8
 PKG_EXTMOD_SUBDIRS:=net/batman-adv
 
 PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
index 4a84f5fffc78f9f7c5a90df12f24b00e9b93d176..31f28b04388a5cd13ce3bf52a45f5e40974abbac 100644 (file)
@@ -7,7 +7,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
 
 --- a/net/batman-adv/multicast.c
 +++ b/net/batman-adv/multicast.c
-@@ -431,9 +431,14 @@ batadv_mcast_mla_softif_get_ipv6(struct
+@@ -430,9 +430,14 @@ batadv_mcast_mla_softif_get_ipv6(struct
                return 0;
        }
  
@@ -22,7 +22,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
                if (IPV6_ADDR_MC_SCOPE(&pmc6->mca_addr) <
                    IPV6_ADDR_SCOPE_LINKLOCAL)
                        continue;
-@@ -462,6 +467,9 @@ batadv_mcast_mla_softif_get_ipv6(struct
+@@ -461,6 +466,9 @@ batadv_mcast_mla_softif_get_ipv6(struct
                hlist_add_head(&new->list, mcast_list);
                ret++;
        }
index 646e179b0d0f825836ef847a2815ab97691d8e67..ee51b8748d4a8d3541659c6f9e0869c9861511d2 100644 (file)
@@ -71,6 +71,20 @@ static inline u32 batadv_get_random_u32_below(u32 ep_ro)
 
 #endif /* LINUX_VERSION_IS_LESS(6, 2, 0) */
 
+#if LINUX_VERSION_IS_LESS(6, 4, 0)
+
+#include <linux/if_vlan.h>
+
+/* Prefer this version in TX path, instead of
+ * skb_reset_mac_header() + vlan_eth_hdr()
+ */
+static inline struct vlan_ethhdr *skb_vlan_eth_hdr(const struct sk_buff *skb)
+{
+       return (struct vlan_ethhdr *)skb->data;
+}
+
+#endif /* LINUX_VERSION_IS_LESS(6, 4, 0) */
+
 /* <DECLARE_EWMA> */
 
 #include <linux/version.h>