[linux-merge]linux integration; annotated tag, batadv-next-for-davem-20200630, created. batadv-next-for-davem-20200630
by postmaster@open-mesh.org
The annotated tag, batadv-next-for-davem-20200630 has been created
at dae3c93ea4b950f8636d82c7e7564f7e130005cb (tag)
tagging 3bda14d09dc5789a895ab02b7dcfcec19b0a65b3 (commit)
replaces v5.8-rc1
tagged by Simon Wunderlich
on Tue Jun 30 10:25:51 2020 +0200
- Shortlog ------------------------------------------------------------
This feature/cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- update mailing list URL, by Sven Eckelmann
- fix typos and grammar in documentation, by Sven Eckelmann
- introduce a configurable per interface hop penalty,
by Linus Luessing
-----BEGIN PGP SIGNATURE-----
iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAl769w8WHHN3QHNpbW9u
d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoatoEACN9O+fCwDIlIdxw/bUlGFw1J+V
4rDReo5grIkl3BSdnLkkaPXTcazCWRoFhCdH6esTsF4/R/nwUa5AZuAbVd2NnCFU
H+hVc7q/w0Hqppx5APT0AghgLcp8mFuHV9jqtJOjv9Kvd05Il6XwGkALT8QX2e2P
ypMD+PBuQT1XCMl0v02lA0ki2TxvCtFYs1UznbAdl86GOGMua3t6fuRWQ2fpUMou
t9251NnwSvSyeYuI8Zws7Wza2S4FOilX/CAjjGi02D0xf7T/JDs3FiPd6obdNfe/
4j6R2dHWjxz1sb6bEdM3wfmUlU4StMQ+Vywpu1fh3gihLc2tmtMZhn6tJk3YjALt
zlwDO2p/si7FLrizfMS7mUesZJH7Ji79BZtZWXsdW3p1zU1jlfJh5dc2ZaKwL9qk
MSpd9DH2F459YC6ELcITLnhCymc7O/g3n3voNnSxi7uX4M5LsGt0mcx6g/iiFN16
nPNHzXo7WJjgRcmLEQ3kYeD7Kjqh5XEogKLnwhThBxCFIQkNFF3OYqWtJyj5Sg5o
+EredOAcq1Rc5CR//V43rQZLk4o1I9qQysKFqbjHohMIgLccz+47QAeBXrhku0ZT
XU6k09Q0pkuo3iVPYnIUTDUkHtvFtsCKR98+8tB5xDR5F155OpFg7AXaKIx5Iym8
4/eGrx22T+6TIeSGGg==
=ceu6
-----END PGP SIGNATURE-----
Linus L��ssing (1):
batman-adv: Introduce a configurable per interface hop penalty
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (1):
batman-adv: Fix typos and grammar in documentation
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[linux-merge]linux integration; annotated tag, v5.8-rc3, created. v5.8-rc3
by postmaster@open-mesh.org
The annotated tag, v5.8-rc3 has been created
at b47cc0b6f2e3c7bb58280670e8fe4b250066c8a1 (tag)
tagging 9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (commit)
replaces v5.8-rc2
tagged by Linus Torvalds
on Sun Jun 28 15:00:24 2020 -0700
- Shortlog ------------------------------------------------------------
Linux 5.8-rc3
-----BEGIN PGP SIGNATURE-----
iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl75EvgeHHRvcnZhbGRz
QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG18MH/jN7yifoZWVmgbVf
csAlaNUMYJDR9uMhGDtKHbN5+mMDj7nSimaM+B/V1aBwkG9lMrAJAmhS8S9zwBbO
oZj4LxrzXI4iqDltDn3o4zr01STWIz29t/AoxL8DUD8gZWFP7DBoIXXE8zzPCXuD
Zl/2gyOWTBe/zlTKB3g7ynjucyqYOSCQruBLv5hIpo9htZZnddVSoA0TVy3yJnUY
YBp4U8TsgLEMKbqi2nofjtjQYCTIl5oVfZPHuwacR5gtZi+AQosumLb29wPvx2Zh
deGjxrUtKhVE8zZo9KO0msuU6ex8bXwy2pqpw2lyojhToKd4lNsneg/hSOuvB+4i
Sgib/Rk=
=AC3+
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[linux-merge]linux integration; annotated tag, v5.8-rc2, created. v5.8-rc2
by postmaster@open-mesh.org
The annotated tag, v5.8-rc2 has been created
at 770e1f41c77abae9307e63a70739ba1904b85044 (tag)
tagging 48778464bb7d346b47157d21ffde2af6b2d39110 (commit)
replaces v5.8-rc1
tagged by Linus Torvalds
on Sun Jun 21 15:45:29 2020 -0700
- Shortlog ------------------------------------------------------------
Linux 5.8-rc2
-----BEGIN PGP SIGNATURE-----
iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl7v4wkeHHRvcnZhbGRz
QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGCzQIAIgjUxLRqUMbPJuS
wApfR5LbR3wfQNd2YypOAFgQ0tasSZiTn2qhesCtmcr0RFb6m8X5/9O2lIlyf2Ts
YKuzvtuiH6+Y2n+n/hjOKAHI8eRRfY9UUR+56+dF+v7RXLba9THaob2efBNJgrK2
ddi1sHMBXF1ViYk2wMuOEyOgM5XoKTPSECqwvYY3qHEr6xa5OlC234Y5EZEM/TO1
gpuuC2fCm++XZo0V7d1zUk6IoW2bv+8NdBOyzGbRkjPM/lQSLklswPOfKDOrm9AX
Rk4anLK0xbZ00MWQe5AJ3uk9rRzPNDJF1EaDD4N4iAWcztXTB8eM17OdnudLY7fP
xMBcJ5w=
=CyHF
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[batman-adv] master: batman-adv: Drop support for Linux < 4.4 (a042622f)
by postmaster@open-mesh.org
Repository : ssh://git@diktynna/batman-adv
On branch : master
>---------------------------------------------------------------
commit a042622f361af134bcde6cb946b005789ac67281
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Apr 13 19:52:29 2020 +0200
batman-adv: Drop support for Linux < 4.4
The Linux Kernel 3.16 reached its end of life [1] after 6 years. Instead it
is recommended to use at least kernel 4.4. It is also already over 4 years
old but still maintained by the stable kernel team. All older kernels
(v3.16 - v4.3) should therefore be dropped to reduce the support overhead.
[1] https://lkml.kernel.org/r/lsq.1591898928.276150302@decadent.org.uk
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
a042622f361af134bcde6cb946b005789ac67281
Makefile | 2 -
README.external.rst | 2 +-
compat-include/linux/average.h | 3 -
compat-include/linux/compiler.h | 15 ---
compat-include/linux/if_bridge.h | 77 ------------
compat-include/linux/igmp.h | 8 +-
compat-include/linux/list.h | 31 -----
compat-include/linux/netdevice.h | 15 ---
compat-include/linux/nl80211.h | 23 ----
compat-include/linux/seq_file.h | 25 ----
compat-include/linux/skbuff.h | 20 ---
compat-include/linux/string.h | 51 --------
compat-include/net/addrconf.h | 8 +-
compat-include/net/cfg80211.h | 19 ---
compat-include/net/ip6_checksum.h | 27 ----
compat-include/net/netlink.h | 28 -----
compat-include/uapi/linux/nl80211.h | 25 ----
compat-sources/Makefile | 8 --
compat-sources/net/core/skbuff.c | 195 -----------------------------
compat-sources/net/ipv4/igmp.c | 223 ----------------------------------
compat-sources/net/ipv6/mcast_snoop.c | 189 ----------------------------
compat.h | 13 --
22 files changed, 5 insertions(+), 1002 deletions(-)
diff --git a/Makefile b/Makefile
index b518db1f..afdbc03c 100644
--- a/Makefile
+++ b/Makefile
@@ -49,8 +49,6 @@ ifneq ($(REVISION),)
NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION=\"$(REVISION)\"
endif
-include $(PWD)/compat-sources/Makefile
-
obj-y += net/batman-adv/
export batman-adv-y
diff --git a/README.external.rst b/README.external.rst
index d8465aa8..b4d07e64 100644
--- a/README.external.rst
+++ b/README.external.rst
@@ -12,7 +12,7 @@ and as external module. The external module allows to get
new features without upgrading to a newer kernel version
and to get batman-adv specific bugfixes for kernels that are
not supported anymore. It compiles against and should work
-with Linux 3.16 - 5.7. Supporting older versions is not
+with Linux 4.4 - 5.7. Supporting older versions is not
planned, but it's probably easy to backport it. If you work on a
backport, feel free to contact us. :-)
diff --git a/compat-include/linux/average.h b/compat-include/linux/average.h
index 046e9cb5..347fdeae 100644
--- a/compat-include/linux/average.h
+++ b/compat-include/linux/average.h
@@ -10,16 +10,13 @@
#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_AVERAGE_H
#define _NET_BATMAN_ADV_COMPAT_LINUX_AVERAGE_H
-#include <linux/version.h>
#include_next <linux/average.h>
#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/log2.h>
-#if LINUX_VERSION_IS_GEQ(4, 3, 0)
#undef DECLARE_EWMA
-#endif /* LINUX_VERSION_IS_LESS(4, 3, 0) */
/*
* Exponentially weighted moving average (EWMA)
diff --git a/compat-include/linux/compiler.h b/compat-include/linux/compiler.h
index 89ed2929..43e12a78 100644
--- a/compat-include/linux/compiler.h
+++ b/compat-include/linux/compiler.h
@@ -13,21 +13,6 @@
#include <linux/version.h>
#include_next <linux/compiler.h>
-#if LINUX_VERSION_IS_LESS(3, 19, 0)
-
-#ifndef READ_ONCE
-#define READ_ONCE(x) ACCESS_ONCE(x)
-#endif
-
-#ifndef WRITE_ONCE
-#define WRITE_ONCE(x, val) ({ \
- ACCESS_ONCE(x) = (val); \
-})
-#endif
-
-#endif /* LINUX_VERSION_IS_LESS(3, 19, 0) */
-
-
#if LINUX_VERSION_IS_LESS(5, 4, 0)
#ifndef fallthrough
diff --git a/compat-include/linux/if_bridge.h b/compat-include/linux/if_bridge.h
deleted file mode 100644
index 8dfcef19..00000000
--- a/compat-include/linux/if_bridge.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_IF_BRIDGE_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_IF_BRIDGE_H_
-
-#include <linux/version.h>
-#include_next <linux/if_bridge.h>
-
-#if LINUX_VERSION_IS_LESS(3, 16, 0)
-
-struct br_ip {
- union {
- __be32 ip4;
-#if IS_ENABLED(CONFIG_IPV6)
- struct in6_addr ip6;
-#endif
- } u;
- __be16 proto;
- __u16 vid;
-};
-
-struct br_ip_list {
- struct list_head list;
- struct br_ip addr;
-};
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) */
-
-#if LINUX_VERSION_IS_LESS(3, 16, 0) || \
- LINUX_VERSION_CODE == KERNEL_VERSION(3, 16, 0) && \
- (!IS_ENABLED(CONFIG_BRIDGE) || \
- !IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING))
-
-#define br_multicast_list_adjacent(dev, br_ip_list) \
- batadv_br_multicast_list_adjacent(dev, br_ip_list)
-
-#define br_multicast_has_querier_adjacent(dev, proto) \
- batadv_br_multicast_has_querier_adjacent(dev, proto)
-
-static inline int
-batadv_br_multicast_list_adjacent(struct net_device *dev,
- struct list_head *br_ip_list)
-{
- return 0;
-}
-
-static inline bool
-batadv_br_multicast_has_querier_adjacent(struct net_device *dev, int proto)
-{
- return false;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) ||
- * == KERNEL_VERSION(3, 16, 0) &&
- * (!IS_ENABLED(CONFIG_BRIDGE) ||
- * !IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING)) */
-
-#if LINUX_VERSION_IS_LESS(3, 17, 0)
-
-static inline bool br_multicast_has_querier_anywhere(struct net_device *dev,
- int proto)
-{
- pr_warn_once("Old kernel detected (< 3.17) - multicast optimizations disabled\n");
-
- return false;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(3, 17, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_IF_BRIDGE_H_ */
diff --git a/compat-include/linux/igmp.h b/compat-include/linux/igmp.h
index 9875d6d4..cea5bfe9 100644
--- a/compat-include/linux/igmp.h
+++ b/compat-include/linux/igmp.h
@@ -13,11 +13,7 @@
#include <linux/version.h>
#include_next <linux/igmp.h>
-#if LINUX_VERSION_IS_LESS(4, 2, 0)
-
-int ip_mc_check_igmp(struct sk_buff *skb);
-
-#elif LINUX_VERSION_IS_LESS(5, 1, 0)
+#if LINUX_VERSION_IS_LESS(5, 1, 0)
static inline int batadv_ip_mc_check_igmp(struct sk_buff *skb)
{
@@ -27,6 +23,6 @@ static inline int batadv_ip_mc_check_igmp(struct sk_buff *skb)
#define ip_mc_check_igmp(skb) \
batadv_ip_mc_check_igmp(skb)
-#endif /* LINUX_VERSION_IS_LESS(4, 2, 0) */
+#endif /* LINUX_VERSION_IS_LESS(5, 1, 0) */
#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ */
diff --git a/compat-include/linux/list.h b/compat-include/linux/list.h
deleted file mode 100644
index 1bd85d0d..00000000
--- a/compat-include/linux/list.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_LIST_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_LIST_H_
-
-#include <linux/version.h>
-#include_next <linux/list.h>
-
-#if LINUX_VERSION_IS_LESS(3, 17, 0)
-
-#define hlist_add_behind(n, prev) hlist_add_after(prev, n)
-
-#endif /* LINUX_VERSION_IS_LESS(3, 17, 0) */
-
-#if LINUX_VERSION_IS_LESS(4, 3, 0)
-
-static inline bool hlist_fake(struct hlist_node *h)
-{
- return h->pprev == &h->next;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(4, 3, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_LIST_H_ */
diff --git a/compat-include/linux/netdevice.h b/compat-include/linux/netdevice.h
index ae7fb906..5dd27341 100644
--- a/compat-include/linux/netdevice.h
+++ b/compat-include/linux/netdevice.h
@@ -13,21 +13,6 @@
#include <linux/version.h>
#include_next <linux/netdevice.h>
-#if LINUX_VERSION_IS_LESS(3, 17, 0)
-
-/* alloc_netdev() was defined differently before 2.6.38 */
-#undef alloc_netdev
-#define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
- alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1)
-
-#endif /* LINUX_VERSION_IS_LESS(3, 17, 0) */
-
-#if LINUX_VERSION_IS_LESS(4, 1, 0)
-
-#define dev_get_iflink(_net_dev) ((_net_dev)->iflink)
-
-#endif /* LINUX_VERSION_IS_LESS(3, 19, 0) */
-
#if LINUX_VERSION_IS_LESS(4, 5, 0)
#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info, extack) \
diff --git a/compat-include/linux/nl80211.h b/compat-include/linux/nl80211.h
deleted file mode 100644
index bea92d1b..00000000
--- a/compat-include/linux/nl80211.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_NL80211_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_NL80211_H_
-
-#include <linux/version.h>
-#include_next <linux/nl80211.h>
-
-#if LINUX_VERSION_IS_LESS(3, 16, 0)
-
-/* Linux 3.15 misses the uapi include.... */
-#include <uapi/linux/nl80211.h>
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_NL80211_H_ */
diff --git a/compat-include/linux/seq_file.h b/compat-include/linux/seq_file.h
deleted file mode 100644
index 74854f56..00000000
--- a/compat-include/linux/seq_file.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_SEQ_FILE_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_SEQ_FILE_H_
-
-#include <linux/version.h>
-#include_next <linux/seq_file.h>
-
-#if LINUX_VERSION_IS_LESS(3, 19, 0)
-
-static inline bool seq_has_overflowed(struct seq_file *m)
-{
- return m->count == m->size;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(3, 19, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_SEQ_FILE_H_ */
diff --git a/compat-include/linux/skbuff.h b/compat-include/linux/skbuff.h
index e92f3422..0d3631d2 100644
--- a/compat-include/linux/skbuff.h
+++ b/compat-include/linux/skbuff.h
@@ -13,26 +13,6 @@
#include <linux/version.h>
#include_next <linux/skbuff.h>
-#if LINUX_VERSION_IS_LESS(3, 16, 0)
-
-#define pskb_copy_for_clone pskb_copy
-
-__sum16 skb_checksum_simple_validate(struct sk_buff *skb);
-
-__sum16
-skb_checksum_validate(struct sk_buff *skb, int proto,
- __wsum (*compute_pseudo)(struct sk_buff *skb, int proto));
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) */
-
-#if LINUX_VERSION_IS_LESS(4, 2, 0)
-
-struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
- unsigned int transport_len,
- __sum16(*skb_chkf)(struct sk_buff *skb));
-
-#endif /* LINUX_VERSION_IS_LESS(4, 2, 0) */
-
#if LINUX_VERSION_IS_LESS(4, 5, 0)
static inline void batadv_skb_postpush_rcsum(struct sk_buff *skb,
diff --git a/compat-include/linux/string.h b/compat-include/linux/string.h
deleted file mode 100644
index 71978031..00000000
--- a/compat-include/linux/string.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2015 Chris Metcalf <cmetcalf(a)ezchip.com>
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_STRING_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_STRING_H_
-
-#include <linux/version.h>
-#include_next <linux/string.h>
-#include <asm-generic/errno-base.h>
-
-#if LINUX_VERSION_IS_LESS(4, 3, 0)
-
-#ifndef __HAVE_ARCH_STRSCPY
-
-static inline ssize_t batadv_strscpy(char *dest, const char *src, size_t count)
-{
- long res = 0;
-
- if (count == 0)
- return -E2BIG;
-
- while (count) {
- char c;
-
- c = src[res];
- dest[res] = c;
- if (!c)
- return res;
- res++;
- count--;
- }
-
- /* Hit buffer length without finding a NUL; force NUL-termination. */
- if (res)
- dest[res-1] = '\0';
-
- return -E2BIG;
-}
-
-#define strscpy(_dest, _src, _count) \
- batadv_strscpy((_dest), (_src), (_count))
-
-#endif
-
-#endif /* LINUX_VERSION_IS_LESS(4, 3, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_STRING_H_ */
diff --git a/compat-include/net/addrconf.h b/compat-include/net/addrconf.h
index 5430811a..8914a66b 100644
--- a/compat-include/net/addrconf.h
+++ b/compat-include/net/addrconf.h
@@ -13,11 +13,7 @@
#include <linux/version.h>
#include_next <net/addrconf.h>
-#if LINUX_VERSION_IS_LESS(4, 2, 0)
-
-int ipv6_mc_check_mld(struct sk_buff *skb);
-
-#elif LINUX_VERSION_IS_LESS(5, 1, 0)
+#if LINUX_VERSION_IS_LESS(5, 1, 0)
static inline int batadv_ipv6_mc_check_mld(struct sk_buff *skb)
{
@@ -27,6 +23,6 @@ static inline int batadv_ipv6_mc_check_mld(struct sk_buff *skb)
#define ipv6_mc_check_mld(skb) \
batadv_ipv6_mc_check_mld(skb)
-#endif /* LINUX_VERSION_IS_LESS(4, 2, 0) */
+#endif /* LINUX_VERSION_IS_LESS(5, 1, 0) */
#endif /* _NET_BATMAN_ADV_COMPAT_NET_ADDRCONF_H_ */
diff --git a/compat-include/net/cfg80211.h b/compat-include/net/cfg80211.h
index 241f44e0..288c1be1 100644
--- a/compat-include/net/cfg80211.h
+++ b/compat-include/net/cfg80211.h
@@ -13,25 +13,6 @@
#include <linux/version.h>
#include_next <net/cfg80211.h>
-#if LINUX_VERSION_IS_LESS(3, 16, 0)
-
-static inline int cfg80211_get_station(struct net_device *dev,
- const u8 *mac_addr,
- struct station_info *sinfo)
-{
- pr_warn_once("cfg80211 based throughput metric is only supported with Linux 3.16+\n");
- return -ENOENT;
-}
-
-/* The following define substitutes the expected_throughput field with a random
- * one existing in the station_info struct. It can be random because due to the
- * function above it will never be used. Only needed to make the code compile
- */
-#define expected_throughput filled
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) */
-
-
#if LINUX_VERSION_IS_LESS(4, 8, 0)
#if !IS_ENABLED(CONFIG_CFG80211) && \
diff --git a/compat-include/net/ip6_checksum.h b/compat-include/net/ip6_checksum.h
deleted file mode 100644
index 8997cbf9..00000000
--- a/compat-include/net/ip6_checksum.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_NET_IP6_CHECKSUM_H_
-#define _NET_BATMAN_ADV_COMPAT_NET_IP6_CHECKSUM_H_
-
-#include <linux/version.h>
-#include_next <net/ip6_checksum.h>
-
-#if LINUX_VERSION_IS_LESS(3, 16, 0)
-
-static inline __wsum ip6_compute_pseudo(struct sk_buff *skb, int proto)
-{
- return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
- &ipv6_hdr(skb)->daddr,
- skb->len, proto, 0));
-}
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_NET_IP6_CHECKSUM_H_ */
diff --git a/compat-include/net/netlink.h b/compat-include/net/netlink.h
deleted file mode 100644
index c7419e15..00000000
--- a/compat-include/net/netlink.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_NET_NETLINK_H_
-#define _NET_BATMAN_ADV_COMPAT_NET_NETLINK_H_
-
-#include <linux/version.h>
-#include_next <net/netlink.h>
-
-#if LINUX_VERSION_IS_LESS(4, 1, 0)
-
-static inline int nla_put_in_addr(struct sk_buff *skb, int attrtype,
- __be32 addr)
-{
- __be32 tmp = addr;
-
- return nla_put_be32(skb, attrtype, tmp);
-}
-
-#endif /* LINUX_VERSION_IS_LESS(4, 1, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_NET_NETLINK_H_ */
diff --git a/compat-include/uapi/linux/nl80211.h b/compat-include/uapi/linux/nl80211.h
deleted file mode 100644
index dff0dd5c..00000000
--- a/compat-include/uapi/linux/nl80211.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_NL80211_H_
-#define _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_NL80211_H_
-
-#include <linux/version.h>
-#include_next <uapi/linux/nl80211.h>
-
-#if LINUX_VERSION_IS_LESS(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
-
-#endif /* LINUX_VERSION_IS_LESS(4, 0, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_NL80211_H_ */
diff --git a/compat-sources/Makefile b/compat-sources/Makefile
deleted file mode 100644
index fd2fce8f..00000000
--- a/compat-sources/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
-#
-# Marek Lindner, Simon Wunderlich
-
-batman-adv-$(CONFIG_BATMAN_ADV_MCAST) += ../../compat-sources/net/core/skbuff.o
-batman-adv-$(CONFIG_BATMAN_ADV_MCAST) += ../../compat-sources/net/ipv4/igmp.o
-batman-adv-$(CONFIG_BATMAN_ADV_MCAST) += ../../compat-sources/net/ipv6/mcast_snoop.o
diff --git a/compat-sources/net/core/skbuff.c b/compat-sources/net/core/skbuff.c
deleted file mode 100644
index fd2771ae..00000000
--- a/compat-sources/net/core/skbuff.c
+++ /dev/null
@@ -1,195 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Routines having to do with the 'struct sk_buff' memory handlers.
- *
- * Authors: Alan Cox <alan(a)lxorguk.ukuu.org.uk>
- * Florian La Roche <rzsfl(a)rz.uni-sb.de>
- *
- * Fixes:
- * Alan Cox : Fixed the worst of the load
- * balancer bugs.
- * Dave Platt : Interrupt stacking fix.
- * Richard Kooijman : Timestamp fixes.
- * Alan Cox : Changed buffer format.
- * Alan Cox : destructor hook for AF_UNIX etc.
- * Linus Torvalds : Better skb_clone.
- * Alan Cox : Added skb_copy.
- * Alan Cox : Added all the changed routines Linus
- * only put in the headers
- * Ray VanTassle : Fixed --skb->lock in free
- * Alan Cox : skb_copy copy arp field
- * Andi Kleen : slabified it.
- * Robert Olsson : Removed skb_head_pool
- *
- * NOTE:
- * The __skb_ routines should be called with interrupts
- * disabled, or you better be *real* sure that the operation is atomic
- * with respect to whatever list is being frobbed (e.g. via lock_sock()
- * or via disabling bottom half handlers, etc).
- */
-
-#include <linux/in6.h>
-#include <linux/ipv6.h>
-#include <linux/skbuff.h>
-#include <linux/types.h>
-#include <net/checksum.h>
-#include <net/ip6_checksum.h>
-
-#if LINUX_VERSION_IS_LESS(3, 16, 0)
-
-/* Compare with:
- * "bridge: multicast: call skb_checksum_{simple_, }validate"
- */
-__sum16 skb_checksum_simple_validate(struct sk_buff *skb)
-{
- switch (skb->ip_summed) {
- case CHECKSUM_COMPLETE:
- if (!csum_fold(skb->csum))
- break;
- fallthrough;
- case CHECKSUM_NONE:
- skb->csum = 0;
- return skb_checksum_complete(skb);
- }
-
- return 0;
-}
-
-/* Watch out: Not as generic as upstream
- * - redefines this method to only fit with ICMPV6
- *
- * Compare with:
- * "bridge: multicast: call skb_checksum_{simple_, }validate"
- */
-__sum16
-skb_checksum_validate(struct sk_buff *skb, int proto,
- __wsum (*compute_pseudo)(struct sk_buff *skb, int proto))
-{
- const struct ipv6hdr *ip6h = ipv6_hdr(skb);
-
- switch (skb->ip_summed) {
- case CHECKSUM_COMPLETE:
- if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, skb->len,
- IPPROTO_ICMPV6, skb->csum))
- break;
- fallthrough;
- case CHECKSUM_NONE:
- skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr,
- &ip6h->daddr,
- skb->len,
- IPPROTO_ICMPV6, 0));
- return __skb_checksum_complete(skb);
- }
-
- return 0;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(3, 16, 0) */
-
-#if LINUX_VERSION_IS_LESS(4, 2, 0)
-
-/**
- * skb_push_rcsum - push skb and update receive checksum
- * @skb: buffer to update
- * @len: length of data pulled
- *
- * This function performs an skb_push on the packet and updates
- * the CHECKSUM_COMPLETE checksum. It should be used on
- * receive path processing instead of skb_push unless you know
- * that the checksum difference is zero (e.g., a valid IP header)
- * or you are setting ip_summed to CHECKSUM_NONE.
- */
-static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)
-{
- skb_push(skb, len);
- skb_postpush_rcsum(skb, skb->data, len);
- return skb->data;
-}
-
-/**
- * skb_checksum_maybe_trim - maybe trims the given skb
- * @skb: the skb to check
- * @transport_len: the data length beyond the network header
- *
- * Checks whether the given skb has data beyond the given transport length.
- * If so, returns a cloned skb trimmed to this transport length.
- * Otherwise returns the provided skb. Returns NULL in error cases
- * (e.g. transport_len exceeds skb length or out-of-memory).
- *
- * Caller needs to set the skb transport header and release the returned skb.
- * Provided skb is consumed.
- */
-static struct sk_buff *skb_checksum_maybe_trim(struct sk_buff *skb,
- unsigned int transport_len)
-{
- struct sk_buff *skb_chk;
- unsigned int len = skb_transport_offset(skb) + transport_len;
- int ret;
-
- if (skb->len < len) {
- kfree_skb(skb);
- return NULL;
- } else if (skb->len == len) {
- return skb;
- }
-
- skb_chk = skb_clone(skb, GFP_ATOMIC);
- kfree_skb(skb);
-
- if (!skb_chk)
- return NULL;
-
- ret = pskb_trim_rcsum(skb_chk, len);
- if (ret) {
- kfree_skb(skb_chk);
- return NULL;
- }
-
- return skb_chk;
-}
-
-/**
- * skb_checksum_trimmed - validate checksum of an skb
- * @skb: the skb to check
- * @transport_len: the data length beyond the network header
- * @skb_chkf: checksum function to use
- *
- * Applies the given checksum function skb_chkf to the provided skb.
- * Returns a checked and maybe trimmed skb. Returns NULL on error.
- *
- * If the skb has data beyond the given transport length, then a
- * trimmed & cloned skb is checked and returned.
- *
- * Caller needs to set the skb transport header and release the returned skb.
- * Provided skb is consumed.
- */
-struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
- unsigned int transport_len,
- __sum16(*skb_chkf)(struct sk_buff *skb))
-{
- struct sk_buff *skb_chk;
- unsigned int offset = skb_transport_offset(skb);
- __sum16 ret;
-
- skb_chk = skb_checksum_maybe_trim(skb, transport_len);
- if (!skb_chk)
- return NULL;
-
- if (!pskb_may_pull(skb_chk, offset)) {
- kfree_skb(skb_chk);
- return NULL;
- }
-
- skb_pull_rcsum(skb_chk, offset);
- ret = skb_chkf(skb_chk);
- skb_push_rcsum(skb_chk, offset);
-
- if (ret) {
- kfree_skb(skb_chk);
- return NULL;
- }
-
- return skb_chk;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(4, 2, 0) */
diff --git a/compat-sources/net/ipv4/igmp.c b/compat-sources/net/ipv4/igmp.c
deleted file mode 100644
index 6c639676..00000000
--- a/compat-sources/net/ipv4/igmp.c
+++ /dev/null
@@ -1,223 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Linux NET3: Internet Group Management Protocol [IGMP]
- *
- * This code implements the IGMP protocol as defined in RFC1112. There has
- * been a further revision of this protocol since which is now supported.
- *
- * If you have trouble with this module be careful what gcc you have used,
- * the older version didn't come out right using gcc 2.5.8, the newer one
- * seems to fall out with gcc 2.6.2.
- *
- * Authors:
- * Alan Cox <alan(a)lxorguk.ukuu.org.uk>
- *
- * Fixes:
- *
- * Alan Cox : Added lots of __inline__ to optimise
- * the memory usage of all the tiny little
- * functions.
- * Alan Cox : Dumped the header building experiment.
- * Alan Cox : Minor tweaks ready for multicast routing
- * and extended IGMP protocol.
- * Alan Cox : Removed a load of inline directives. Gcc 2.5.8
- * writes utterly bogus code otherwise (sigh)
- * fixed IGMP loopback to behave in the manner
- * desired by mrouted, fixed the fact it has been
- * broken since 1.3.6 and cleaned up a few minor
- * points.
- *
- * Chih-Jen Chang : Tried to revise IGMP to Version 2
- * Tsu-Sheng Tsao E-mail: chihjenc(a)scf.usc.edu and tsusheng(a)scf.usc.edu
- * The enhancements are mainly based on Steve Deering's
- * ipmulti-3.5 source code.
- * Chih-Jen Chang : Added the igmp_get_mrouter_info and
- * Tsu-Sheng Tsao igmp_set_mrouter_info to keep track of
- * the mrouted version on that device.
- * Chih-Jen Chang : Added the max_resp_time parameter to
- * Tsu-Sheng Tsao igmp_heard_query(). Using this parameter
- * to identify the multicast router version
- * and do what the IGMP version 2 specified.
- * Chih-Jen Chang : Added a timer to revert to IGMP V2 router
- * Tsu-Sheng Tsao if the specified time expired.
- * Alan Cox : Stop IGMP from 0.0.0.0 being accepted.
- * Alan Cox : Use GFP_ATOMIC in the right places.
- * Christian Daudt : igmp timer wasn't set for local group
- * memberships but was being deleted,
- * which caused a "del_timer() called
- * from %p with timer not initialized\n"
- * message (960131).
- * Christian Daudt : removed del_timer from
- * igmp_timer_expire function (960205).
- * Christian Daudt : igmp_heard_report now only calls
- * igmp_timer_expire if tm->running is
- * true (960216).
- * Malcolm Beattie : ttl comparison wrong in igmp_rcv made
- * igmp_heard_query never trigger. Expiry
- * miscalculation fixed in igmp_heard_query
- * and random() made to return unsigned to
- * prevent negative expiry times.
- * Alexey Kuznetsov: Wrong group leaving behaviour, backport
- * fix from pending 2.1.x patches.
- * Alan Cox: Forget to enable FDDI support earlier.
- * Alexey Kuznetsov: Fixed leaving groups on device down.
- * Alexey Kuznetsov: Accordance to igmp-v2-06 draft.
- * David L Stevens: IGMPv3 support, with help from
- * Vinay Kulkarni
- */
-
-#include <linux/igmp.h>
-#include <linux/ip.h>
-#include <linux/skbuff.h>
-#include <net/ip.h>
-
-#if LINUX_VERSION_IS_LESS(4, 2, 0)
-
-static int ip_mc_check_iphdr(struct sk_buff *skb)
-{
- const struct iphdr *iph;
- unsigned int len;
- unsigned int offset = skb_network_offset(skb) + sizeof(*iph);
-
- if (!pskb_may_pull(skb, offset))
- return -EINVAL;
-
- iph = ip_hdr(skb);
-
- if (iph->version != 4 || ip_hdrlen(skb) < sizeof(*iph))
- return -EINVAL;
-
- offset += ip_hdrlen(skb) - sizeof(*iph);
-
- if (!pskb_may_pull(skb, offset))
- return -EINVAL;
-
- iph = ip_hdr(skb);
-
- if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
- return -EINVAL;
-
- len = skb_network_offset(skb) + ntohs(iph->tot_len);
- if (skb->len < len || len < offset)
- return -EINVAL;
-
- skb_set_transport_header(skb, offset);
-
- return 0;
-}
-
-static int ip_mc_check_igmp_reportv3(struct sk_buff *skb)
-{
- unsigned int len = skb_transport_offset(skb);
-
- len += sizeof(struct igmpv3_report);
-
- return pskb_may_pull(skb, len) ? 0 : -EINVAL;
-}
-
-static int ip_mc_check_igmp_query(struct sk_buff *skb)
-{
- unsigned int len = skb_transport_offset(skb);
-
- len += sizeof(struct igmphdr);
- if (skb->len < len)
- return -EINVAL;
-
- /* IGMPv{1,2}? */
- if (skb->len != len) {
- /* or IGMPv3? */
- len += sizeof(struct igmpv3_query) - sizeof(struct igmphdr);
- if (skb->len < len || !pskb_may_pull(skb, len))
- return -EINVAL;
- }
-
- /* RFC2236+RFC3376 (IGMPv2+IGMPv3) require the multicast link layer
- * all-systems destination addresses (224.0.0.1) for general queries
- */
- if (!igmp_hdr(skb)->group &&
- ip_hdr(skb)->daddr != htonl(INADDR_ALLHOSTS_GROUP))
- return -EINVAL;
-
- return 0;
-}
-
-static int ip_mc_check_igmp_msg(struct sk_buff *skb)
-{
- switch (igmp_hdr(skb)->type) {
- case IGMP_HOST_LEAVE_MESSAGE:
- case IGMP_HOST_MEMBERSHIP_REPORT:
- case IGMPV2_HOST_MEMBERSHIP_REPORT:
- /* fall through */
- return 0;
- case IGMPV3_HOST_MEMBERSHIP_REPORT:
- return ip_mc_check_igmp_reportv3(skb);
- case IGMP_HOST_MEMBERSHIP_QUERY:
- return ip_mc_check_igmp_query(skb);
- default:
- return -ENOMSG;
- }
-}
-
-static inline __sum16 ip_mc_validate_checksum(struct sk_buff *skb)
-{
- return skb_checksum_simple_validate(skb);
-}
-
-static int __ip_mc_check_igmp(struct sk_buff *skb)
-
-{
- struct sk_buff *skb_chk;
- unsigned int transport_len;
- unsigned int len = skb_transport_offset(skb) + sizeof(struct igmphdr);
- int ret;
-
- transport_len = ntohs(ip_hdr(skb)->tot_len) - ip_hdrlen(skb);
-
- skb_get(skb);
- skb_chk = skb_checksum_trimmed(skb, transport_len,
- ip_mc_validate_checksum);
- if (!skb_chk)
- return -EINVAL;
-
- if (!pskb_may_pull(skb_chk, len)) {
- kfree_skb(skb_chk);
- return -EINVAL;
- }
-
- ret = ip_mc_check_igmp_msg(skb_chk);
- if (ret) {
- kfree_skb(skb_chk);
- return ret;
- }
-
- kfree_skb(skb_chk);
-
- return 0;
-}
-
-/**
- * ip_mc_check_igmp - checks whether this is a sane IGMP packet
- * @skb: the skb to validate
- *
- * Checks whether an IPv4 packet is a valid IGMP packet. If so sets
- * skb network and transport headers accordingly and returns zero.
- *
- * -EINVAL: A broken packet was detected, i.e. it violates some internet
- * standard
- * -ENOMSG: IP header validation succeeded but it is not an IGMP packet.
- * -ENOMEM: A memory allocation failure happened.
- */
-int ip_mc_check_igmp(struct sk_buff *skb)
-{
- int ret = ip_mc_check_iphdr(skb);
-
- if (ret < 0)
- return ret;
-
- if (ip_hdr(skb)->protocol != IPPROTO_IGMP)
- return -ENOMSG;
-
- return __ip_mc_check_igmp(skb);
-}
-
-#endif /* LINUX_VERSION_IS_LESS(4, 2, 0) */
diff --git a/compat-sources/net/ipv6/mcast_snoop.c b/compat-sources/net/ipv6/mcast_snoop.c
deleted file mode 100644
index 651b8e3b..00000000
--- a/compat-sources/net/ipv6/mcast_snoop.c
+++ /dev/null
@@ -1,189 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2010: YOSHIFUJI Hideaki <yoshfuji(a)linux-ipv6.org>
- * Copyright (C) 2015: Linus L��ssing <linus.luessing(a)c0d3.blue>
- *
- * Based on the MLD support added to br_multicast.c by YOSHIFUJI Hideaki.
- */
-
-#include <linux/skbuff.h>
-#include <net/ipv6.h>
-#include <net/mld.h>
-#include <net/addrconf.h>
-#include <net/ip6_checksum.h>
-
-#if LINUX_VERSION_IS_LESS(4, 2, 0)
-
-static int ipv6_mc_check_ip6hdr(struct sk_buff *skb)
-{
- const struct ipv6hdr *ip6h;
- unsigned int len;
- unsigned int offset = skb_network_offset(skb) + sizeof(*ip6h);
-
- if (!pskb_may_pull(skb, offset))
- return -EINVAL;
-
- ip6h = ipv6_hdr(skb);
-
- if (ip6h->version != 6)
- return -EINVAL;
-
- len = offset + ntohs(ip6h->payload_len);
- if (skb->len < len || len <= offset)
- return -EINVAL;
-
- return 0;
-}
-
-static int ipv6_mc_check_exthdrs(struct sk_buff *skb)
-{
- const struct ipv6hdr *ip6h;
- int offset;
- u8 nexthdr;
- __be16 frag_off;
-
- ip6h = ipv6_hdr(skb);
-
- if (ip6h->nexthdr != IPPROTO_HOPOPTS)
- return -ENOMSG;
-
- nexthdr = ip6h->nexthdr;
- offset = skb_network_offset(skb) + sizeof(*ip6h);
- offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off);
-
- if (offset < 0)
- return -EINVAL;
-
- if (nexthdr != IPPROTO_ICMPV6)
- return -ENOMSG;
-
- skb_set_transport_header(skb, offset);
-
- return 0;
-}
-
-static int ipv6_mc_check_mld_reportv2(struct sk_buff *skb)
-{
- unsigned int len = skb_transport_offset(skb);
-
- len += sizeof(struct mld2_report);
-
- return pskb_may_pull(skb, len) ? 0 : -EINVAL;
-}
-
-static int ipv6_mc_check_mld_query(struct sk_buff *skb)
-{
- struct mld_msg *mld;
- unsigned int len = skb_transport_offset(skb);
-
- /* RFC2710+RFC3810 (MLDv1+MLDv2) require link-local source addresses */
- if (!(ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL))
- return -EINVAL;
-
- len += sizeof(struct mld_msg);
- if (skb->len < len)
- return -EINVAL;
-
- /* MLDv1? */
- if (skb->len != len) {
- /* or MLDv2? */
- len += sizeof(struct mld2_query) - sizeof(struct mld_msg);
- if (skb->len < len || !pskb_may_pull(skb, len))
- return -EINVAL;
- }
-
- mld = (struct mld_msg *)skb_transport_header(skb);
-
- /* RFC2710+RFC3810 (MLDv1+MLDv2) require the multicast link layer
- * all-nodes destination address (ff02::1) for general queries
- */
- if (ipv6_addr_any(&mld->mld_mca) &&
- !ipv6_addr_is_ll_all_nodes(&ipv6_hdr(skb)->daddr))
- return -EINVAL;
-
- return 0;
-}
-
-static int ipv6_mc_check_mld_msg(struct sk_buff *skb)
-{
- struct mld_msg *mld = (struct mld_msg *)skb_transport_header(skb);
-
- switch (mld->mld_type) {
- case ICMPV6_MGM_REDUCTION:
- case ICMPV6_MGM_REPORT:
- /* fall through */
- return 0;
- case ICMPV6_MLD2_REPORT:
- return ipv6_mc_check_mld_reportv2(skb);
- case ICMPV6_MGM_QUERY:
- return ipv6_mc_check_mld_query(skb);
- default:
- return -ENOMSG;
- }
-}
-
-static inline __sum16 ipv6_mc_validate_checksum(struct sk_buff *skb)
-{
- return skb_checksum_validate(skb, IPPROTO_ICMPV6, ip6_compute_pseudo);
-}
-
-static int __ipv6_mc_check_mld(struct sk_buff *skb)
-
-{
- struct sk_buff *skb_chk = NULL;
- unsigned int transport_len;
- unsigned int len = skb_transport_offset(skb) + sizeof(struct mld_msg);
- int ret;
-
- transport_len = ntohs(ipv6_hdr(skb)->payload_len);
- transport_len -= skb_transport_offset(skb) - sizeof(struct ipv6hdr);
-
- skb_get(skb);
- skb_chk = skb_checksum_trimmed(skb, transport_len,
- ipv6_mc_validate_checksum);
- if (!skb_chk)
- return -EINVAL;
-
- if (!pskb_may_pull(skb_chk, len)) {
- kfree_skb(skb_chk);
- return -EINVAL;
- }
-
- ret = ipv6_mc_check_mld_msg(skb_chk);
- if (ret) {
- kfree_skb(skb_chk);
- return ret;
- }
-
- kfree_skb(skb_chk);
-
- return 0;
-}
-
-/**
- * ipv6_mc_check_mld - checks whether this is a sane MLD packet
- * @skb: the skb to validate
- *
- * Checks whether an IPv6 packet is a valid MLD packet. If so sets
- * skb network and transport headers accordingly and returns zero.
- *
- * -EINVAL: A broken packet was detected, i.e. it violates some internet
- * standard
- * -ENOMSG: IP header validation succeeded but it is not an MLD packet.
- * -ENOMEM: A memory allocation failure happened.
- */
-int ipv6_mc_check_mld(struct sk_buff *skb)
-{
- int ret;
-
- ret = ipv6_mc_check_ip6hdr(skb);
- if (ret < 0)
- return ret;
-
- ret = ipv6_mc_check_exthdrs(skb);
- if (ret < 0)
- return ret;
-
- return __ipv6_mc_check_mld(skb);
-}
-
-#endif /* LINUX_VERSION_IS_LESS(4, 2, 0) */
diff --git a/compat.h b/compat.h
index 21bacc5d..e3220e39 100644
--- a/compat.h
+++ b/compat.h
@@ -15,19 +15,6 @@
#include "compat-autoconf.h"
-#if LINUX_VERSION_IS_LESS(4, 0, 0)
-
-/* 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
-
-#endif /* LINUX_VERSION_IS_LESS(4, 0, 0) */
-
-#if LINUX_VERSION_IS_LESS(4, 3, 0)
-
-#define IFF_NO_QUEUE 0; dev->tx_queue_len = 0
-
-#endif /* LINUX_VERSION_IS_LESS(4, 3, 0) */
-
#if LINUX_VERSION_IS_LESS(4, 15, 0)
#define batadv_softif_slave_add(__dev, __slave_dev, __extack) \
2 years, 7 months
[batctl] master: batctl: Disable automatic destruction of empty meshifs (51b0746)
by postmaster@open-mesh.org
Repository : ssh://git@diktynna/batctl
On branch : master
>---------------------------------------------------------------
commit 51b07466550480d5b141a2d216f276f57c93a5c3
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Jun 13 17:59:35 2020 +0200
batctl: Disable automatic destruction of empty meshifs
The sysfs interface of batman-adv used an automatic drop of empty batadv
meshifs. This was necessary because no other method to remove this type
of interface was available. The same behavior was tried to emulate in the
batctl rtnetlink implementation to make the migration easier.
But this caused problems with both (rtnetlink/sysfs) backends because the
caller might not be aware of the current state of hardifs list for the
current meshif. The meshif might therefore be deleted accidentally (and its
configuration lost) even when the caller only wanted to swap some devices
around.
Instead print information about the necessary addition steps to drop the
empty meshif instead of performing it automatically.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
51b07466550480d5b141a2d216f276f57c93a5c3
interface.c | 5 +++--
man/batctl.8 | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/interface.c b/interface.c
index ac4d883..d0d9435 100644
--- a/interface.c
+++ b/interface.c
@@ -31,7 +31,7 @@ static void interface_usage(void)
fprintf(stderr, "Usage: batctl [options] interface [parameters] [add|del iface(s)]\n");
fprintf(stderr, " batctl [options] interface [parameters] [create|destroy]\n");
fprintf(stderr, "parameters:\n");
- fprintf(stderr, " \t -M disable automatic creation/removal of batman-adv interface\n");
+ fprintf(stderr, " \t -M disable automatic creation of batman-adv interface\n");
fprintf(stderr, " \t -h print this help\n");
}
@@ -535,7 +535,8 @@ static int interface(struct state *state, int argc, char **argv)
if (!manual_mode && rest_argv[0][0] == 'd') {
cnt = count_interfaces(state->mesh_iface);
if (cnt == 0 && pre_cnt > 0)
- destroy_interface(state->mesh_iface);
+ fprintf(stderr, "Warning: %s has no interfaces and can be destroyed with: batctl meshif %s interface destroy\n",
+ state->mesh_iface, state->mesh_iface);
}
return EXIT_SUCCESS;
diff --git a/man/batctl.8 b/man/batctl.8
index 6e75cdd..fedfb21 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -58,8 +58,8 @@ performances, is also included.
If no parameter is given or the first parameter is neither "add" nor "del" the current interface settings are displayed.
In order to add or delete interfaces specify "add" or "del" as first argument and append the interface names you wish to
add or delete. Multiple interfaces can be specified.
-The "\-M" option tells batctl to not automatically create the batman-adv interface on "add" or to destroy it when "del"
-removed all interfaces which belonged to it.
+The "\-M" option tells batctl to not automatically create the batman-adv interface on "add". It can also be used to
+suppress the warning about the manual destruction when "del" removed all interfaces which belonged to it.
.IP "[\fBmeshif <netdev>\fP] \fBinterface\fP|\fBif\fP [\fBcreate\fP|\fBdestroy\fP]"
A batman-adv interface without attached interfaces can be created using "create". The parameter "destroy" can be used to
free all attached interfaces and remove batman-adv interface.
2 years, 7 months
[linux-merge]linux integration; annotated tag, v4.9.227, created. v4.9.227
by postmaster@open-mesh.org
The annotated tag, v4.9.227 has been created
at 982feec0167d7a39bf1bfdff532ba36ffb38d4db (tag)
tagging e0799bae56744764303252ac8d52ddb5774bcb4e (commit)
replaces v4.9.225
tagged by Greg Kroah-Hartman
on Thu Jun 11 09:22:24 2020 +0200
- Shortlog ------------------------------------------------------------
This is the 4.9.227 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl7h27AACgkQONu9yGCS
aT7ZMg//QSNeFhQj5Z17hJNGHgSWNDnb8goeACU9L36FspUOJe4y2u505gDrBDUg
AvoxGc8xrsGIdzOeGD9d0NcHMg8JauJz80/rXYpl+Xce83PqzFIrc9AvLtjClLgS
RdJpBZamHW1Zrp2KNyptr95e+pfTECHjMPotdz0c8G/th65BurFENHVrQoFiWSmn
T1VVztQYN9y0fdV0Bb2RhAfFvWEPLTRlfyvJNrfdA1n+v82ytDpAAK5AqavTuoo4
2dBAOIU3sQnLSa6I3ejpu1Ok8V+V3qRqwMxGDtzCrWU/pFiOY6rRfdu/SPJHnblV
lfDUFCH29tZUAAG/vLpqKKOkq4sdqGhvZz5DwTLT4+KcwiW8HI7VwyyxmYfz2VQO
5ekg7YXcKHu1l+h4UlJWmp3UOJu7i7tvGSjRhfKAM6KoC29uRJhzv68pXiRpHU+6
u4k00tCGwq1abaTS6SA9F7FWsCHAc6eCqpgvBD0B4Pdv7O3iT6vANPF+mPQOnMZc
PoWc+gUBB/mO6aJPULHxJ9hVmB0u2AgDRPge5GkYLcK2+w7VbmbelRga/ZJHn7gP
WQrBdIwF0hdD+U5J7/GGkuEJcJZ5AfpF4fSygJNiRkDEiNsjejSGuxIXH5bL+LaT
1iIdoFjLzewqL7CHTCuv+J7LoA4oo+nuuyfVt8dEW3d6/x5U78Y=
=S6xH
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[linux-merge]linux integration; annotated tag, v4.4.227, created. v4.4.227
by postmaster@open-mesh.org
The annotated tag, v4.4.227 has been created
at 9dcf57712a9cd17200a7b6d9b6263553ae8db15e (tag)
tagging f17c881e4c8899900a5a77e87fb064158d32b05c (commit)
replaces v4.4.225
tagged by Greg Kroah-Hartman
on Thu Jun 11 09:21:42 2020 +0200
- Shortlog ------------------------------------------------------------
This is the 4.4.227 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl7h24YACgkQONu9yGCS
aT4+fBAAinXOU3Ldz92fk1zybC9vfwlLn6d2+T1wNASEBA1a3cUEviHSD7vMfUS5
5ZXcKWW25IVGUgskFiFV8QYKd4dQCFjroR3Ntw2k9YJOfEGrEsfeuUVmzWKrBH5+
z2pzoEXYjZaQxW4IGkE6/hw9E8KA5KeD44rV7hb2zSVPNT1FhagEAuyHYL1C4JQq
koU5bXQGDUBiW4X0a+Y7ot/b077TB1bS334BwM9v23uyeuiSTGMWSEqKEa8wiWG6
/T8+QcDi5djWfEXOGhlA8vyTmQWO/yuER+tx3np/3sWc4RZcYjqSKL+CyytcOOne
rVsl9e+iqbfVy10vB4T97OEXtIUMrnPwaxH57HdMYJQIjqWgvYeJB/EsH3jE6SCK
sYUq+4nxE0slaIpulW14B9l/Hs7mCUkJmQWdSkoDGidaLqxDulbN2Xtbq9FAsb0X
Fo+PPo1M5SptfExIa7KZGpovhR17frP7QMhP9FfiQvZR1WECRHHB32xpexoePFnX
BeWUeUVYHujs6MZugRJUEfLGIuJUbmkW+kAIBpJ7Z42ubzh9sCoaSC4jLnoJPr1V
hoG5GeTPx7GnElgP5i8yWsM2sV/BHu8lcsIB/GDPNXilfVngZe59MoC5FjZg6PUH
QVnyLf8ZCn7BAEX5HbSI6agx7NpgD5eqTaKCGe2213XvKKXNgzY=
=WSvh
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[linux-merge]linux integration; annotated tag, v3.16.85, created. v3.16.85
by postmaster@open-mesh.org
The annotated tag, v3.16.85 has been created
at db6650f7eabceced99d63122c7f372c9783fd097 (tag)
tagging 16f3f0d74b2069038a24f69952f0c19ad7c48d9a (commit)
replaces v3.16.84
tagged by Ben Hutchings
on Thu Jun 11 19:06:09 2020 +0100
- Shortlog ------------------------------------------------------------
This is the 3.16.85 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAl7icpEACgkQ57/I7JWG
EQnqChAAu4+CyKRW2deHKrMmiWPKHJswDqMXr24tgjOEeVvIxjiy9F3kCVMlXPVQ
3MOre3X0jwKStDVg53xbxSHxRWCwXtB/G3Af47v9e3h81wl4l6yda4BJK45jFtuH
xrIfqRb2iE8qAXPEVFVWyO3+kgAq3y8a6uYig5WNbfZ6cj6tgq+mGoY2Bc2JsnOB
g+0QqAcy0gJPbsypQcxBgyWr4FUHYk0PQJMvkL63kc7wuDb5CSe/nqbC5QO4Ir66
PrpNLE3q6GKy/AVfBbENdsgVz2h3DdnTgD+/6mverXqT9E0QKYRN8YGrQHYumPK4
yL4K65nWMJDE/y5qLvldDEmRMhGRVNbiccqBsCkejXtlZJZe2necrbWbVf4eijnM
Xefky93DNAe6Yttb4VDuKOp+MOYF7YMRdU3Q9dE9/vVuzUGuCRVViH6UDYmoljHb
OHZOJvxH68JncScMhffj3Zo81wJtoLfnNUNpSW9iWqgDutdfaFEyl212unW06INq
byP9qAfGm+GB2VxChjxEe/PitM2X7JmDkQKn3NTiK1NECap9zJVyukGRoj3ljsUz
BJIgvkfawJ0MRvAk4fWY9XlYijBXZyWkgU7hQYuRU0LscDDpTQOzsm63iIaBzs9L
VcB4ZVePJ9GZx00Bt5n+AijiSIoozHm0WiaoZtr4MCCSYtZAzGg=
=0dWu
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[linux-merge]linux integration; annotated tag, v5.7.3, created. v5.7.3
by postmaster@open-mesh.org
The annotated tag, v5.7.3 has been created
at fd5c823516f2006aaf1ff93fdd82e70b406bf0d8 (tag)
tagging 264e468fc201cb81c313ad50924bb46506a1b31c (commit)
replaces v5.7
tagged by Greg Kroah-Hartman
on Wed Jun 17 16:43:05 2020 +0200
- Shortlog ------------------------------------------------------------
This is the 5.7.3 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl7qK/kACgkQONu9yGCS
aT49cw//b7iScPoye6xG1y1MuIH4afohadUc8pyXqGl8BrIvUAYGMTPlvGIZqVfj
YlYX+ImHAeh+Uff5/y5uzVnV2v+FGvWUQbTkh2glauxYOvLKNP5goP2/pbeejbzU
NLlBPx6Z9LcwyuOFoLZirx7j0wjRfMs4iW2YxqppffkuHDKLDgJhIhAsLBtLgkNV
Cd4A/F4HJ6l8tImZOhb5wiDeaahBdrcwZe5ymOjZdWY8cWg9cP2w9I/oCAocmvIJ
DUweROk61WmZpWABTbc9eZ5LuWxK4E2UY/1u4pUsYLp/mLweoxTIKe63en+ifff/
XZc/GIQel6h/NovVSNnKbGJh5w4VU3wDGSfCQWtZ7FbWmG3YJ7Jfxye7Y6PNbSCj
5MixJzjoxlEnF22YqR28e7Haqo7ZLhQOlRGHCcvZSxUxuefAC1r7Wr0sxu7kPHga
fHrHlXX10tUyagQ/h7NEk63b3VOC1rOn+STE9DI82pbm5nVg2jzxDOmzqola4R9c
ZfPD4i48CyeG7H2yH2J+MWFY9tECFzDKjbfWknAdWgrNBNAWcceLC+cjMXrfZPWH
J2EdtzB0GtkOVVbSF/PX87L5l+WAM3VNFJCYTxapyBFOtR8uJGzjj1Fj7gYQmzpj
15MJV60VARW3J1+mC7LkuIaOvCZ7x4gYcguPzMakdHONIJC8VBU=
=cWLV
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months
[linux-merge]linux integration; annotated tag, v5.4.47, created. v5.4.47
by postmaster@open-mesh.org
The annotated tag, v5.4.47 has been created
at 44edacf70fc991648b0dcb443a5106b17bc70e7e (tag)
tagging fd8cd8ac940c8b45b75474415291a3b941c865ab (commit)
replaces v5.4.43
tagged by Greg Kroah-Hartman
on Wed Jun 17 16:40:40 2020 +0200
- Shortlog ------------------------------------------------------------
This is the 5.4.47 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl7qK2gACgkQONu9yGCS
aT4kaw/8Cknc9G64S1SWchxFj4LnSYzrpeFGXOZBlHBtcCyD12JNGjA6SG6DoGLY
/s/1fjBwJWrWpkI36CGNZowNPYtzRMOhyBGj7QHTpEj0vjMTKYXhVieMquQSHwRP
zcrYl8f/xWJKo6XNjR1YLh5PWeD6B9dWD1RcvBZ0jCez84jyVT1EyWMWGiodkLMx
gmJITO2DBaekelU0yyZJIFePO5DJpcXspf5lrPgkPG9u/U4hZf94AAGMYbXJZ5Rn
BDcqGEGQe+mtcG6lq6DGRDH5VVMG4k13MrZJBfrVAhkGU+g6nKQbOXCcdcRjoM6N
9NL8RbcpL0NhphNmrKwjNcYd4kZxYgTQb87FZi+qDxwGQIWIxcET6gL5t/vqAev1
v/uKFLlt5x/2tNtpC8aY8EwdyGcXfeBXEl9AjP7HUWC/KzB8I9vLnokcMvOMYDIg
3wNIsKMYLcLzuLL8oJ7FvDkBO+H/RjSvF4UvQyLOPOJtWSV5uKbLfKIU9sw90G3i
t8qo3lNC/J4saJ+jx+O7XoHjFw6biJFATvs0+HtpCkwi0aJm2SGW+OvXuZCGZPnz
TW2YsGFCCwL/RPtceJVkGfV3kr7SUB5AGXjueXdC+4QWfmi3POWojjgheQrleS+3
OLxRsUVbQ6hOqEgLAaV6HhzvykkTjDj2Gq8P3I+1Y/eiRHjlpdU=
=WYnW
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
2 years, 7 months