Skip to contentSkip to conversation

batman-adv: compat: use netns_immutable in Linux 6.12.114

PATCH New Sven Eckelmann 1 participant 1 message Oct 18 Batman advanced

lore
Share & tools
lore

Sven Eckelmann

author maintainer
#0 lore raw

PATCH 1/1 batman-adv: compat: use netns_immutable in Linux 6.12.114

The commit 0c493da86374 ("net: rename netns_local to netns_immutable") was backported back to Linux 6.12.114. batman-adv must therefore stop to use netns_local for newer 6.12.y kernels.

---
 compat-include/linux/netdevice.h | 7 +++++++
 net/batman-adv/mesh-interface.c  | 7 ++-----
 2 files changed, 9 insertions(+), 5 deletions(-)
compat-include/linux/netdevice.h +7 -0
index 45df743e..992f1dcf 100644
@@ -16,4 +16,11 @@
 
 #endif /* LINUX_VERSION_IS_LESS(6, 0, 0) */
 
+#if LINUX_VERSION_IS_LESS(6, 15, 0) && \
+    !(LINUX_VERSION_IS_GEQ(6, 12, 114) && LINUX_VERSION_IS_LESS(6, 13, 0))
+
+#define netns_immutable netns_local
+
+#endif /* LINUX_VERSION_IS_LESS(6, 15, 0) */
+
 #endif	/* _NET_BATMAN_ADV_COMPAT_LINUX_NETDEVICE_H_ */
net/batman-adv/mesh-interface.c +2 -5
index 41d14863..d1263c77 100644
@@ -1090,13 +1090,10 @@ static void batadv_meshif_init_early(struct net_device *dev)
 	dev->priv_destructor = batadv_meshif_free;
 	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
 	dev->priv_flags |= IFF_NO_QUEUE;
-#if LINUX_VERSION_IS_GEQ(6, 15, 0) // UGLY_HACK_NEW
+#if LINUX_VERSION_IS_GEQ(6, 12, 0) // UGLY_HACK_NEW
 	dev->lltx = true;
 	dev->netns_immutable = true;
-#elif LINUX_VERSION_IS_GEQ(6, 12, 0) // UGLY_HACK_OLD
-	dev->lltx = true;
-	dev->netns_local = true;
-#else
+#else // UGLY_HACK_OLD
 	dev->features |= NETIF_F_LLTX | NETIF_F_NETNS_LOCAL;
 #endif // UGLY_HACK_STOP
 

---
base-commit: c1d440f3d066942932a55866a5f69bd4d486a5b7
change-id: 20261018-stable-netns_immutable-7e700de0b5b8

Best regards,

Signature · 1 line
Sven Eckelmann <[email protected]>