* support latest kernels (3.2 - 4.10) * change installation path back to $INSTALL_MOD_DIR/updates/net/batman-adv * add simple (re)broadcast avoidance * reduce multicast TT and TVLV update delays under B.A.T.M.A.N. V * support B.A.T.M.A.N. V throughput detection when using VLANs on top of WiFi * improve documentation of sysfs and debugfs files * coding style cleanups and refactoring * bugs squashed: - detect missing primaryif during tp_send as error - fix re-adding of previously removed interfaces via rtnetlink - fix rare race conditions on interface removal - handle allocation error when generating TT responses Signed-off-by: Sven Eckelmann <sven@narfation.org>
29 lines
867 B
Diff
29 lines
867 B
Diff
From: Sven Eckelmann <sven@narfation.org>
|
|
Date: Fri, 23 Sep 2016 14:55:38 +0200
|
|
Subject: [PATCH] Add compat fallback for batadv_getlink_net
|
|
---
|
|
net/batman-adv/hard-interface.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
|
|
index 61a431a9..6969f580 100644
|
|
--- a/net/batman-adv/hard-interface.c
|
|
+++ b/net/batman-adv/hard-interface.c
|
|
@@ -95,6 +95,9 @@ out:
|
|
static struct net *batadv_getlink_net(const struct net_device *netdev,
|
|
struct net *fallback_net)
|
|
{
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
|
|
+ return fallback_net;
|
|
+#else
|
|
if (!netdev->rtnl_link_ops)
|
|
return fallback_net;
|
|
|
|
@@ -102,6 +105,7 @@ static struct net *batadv_getlink_net(const struct net_device *netdev,
|
|
return fallback_net;
|
|
|
|
return netdev->rtnl_link_ops->get_link_net(netdev);
|
|
+#endif
|
|
}
|
|
|
|
/**
|