Commit Graph

29 Commits

Author SHA1 Message Date
Sven Eckelmann 96b5fa139c 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>
2023-12-23 15:33:57 +01:00
Sven Eckelmann 04bbb0a87e 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>
2023-05-27 12:15:47 +02:00
Sven Eckelmann 6afc0452c2 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>
2023-05-27 12:09:02 +02:00
Sven Eckelmann b4034e4ae1 batman-adv: update to version 2023.0
* support latest kernels (4.14 - 6.2)

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2023-01-26 22:29:55 +01:00
Sven Eckelmann 081291592e 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>
2022-11-10 21:44:20 +01:00
Sven Eckelmann 4216c909aa 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: b65a8ca03a ("batman-adv: update to version 2022.1")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-05-12 14:29:10 +02:00
Sven Eckelmann b65a8ca03a 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>
2022-05-06 22:09:55 +02:00
Sven Eckelmann b1d9a55b49 batman-adv: Drop compat hacks for kernels < 5.10
OpenWrt master is no longer providing any kernels older than 5.10. Just
drop the compat-hacks for older kernels to make it easier to maintain the
package.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-04-17 14:00:29 +02:00
Sven Eckelmann a2fe1d4131 batman-adv: Drop duplicated dev_{hold,put} compat helpers
The mac80211 package in OpenWrt master is now already providing helpers for
the changed dev_{hold,put} behavior in Linux 5.15. It is no longer
necessary to ship them as part of the batman-adv package.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-11-27 17:10:06 +01:00
Sven Eckelmann ca6c9edc3e batman-adv: update to version 2021.4
* support latest kernels (4.4 - 5.16)
* coding style cleanups and refactoring
* bugs squashed:

  - fix error handling during interface initialization

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-11-19 17:40:29 +01:00
Sven Eckelmann a7b79a1d4f batman-adv: update to version 2021.3
* support latest kernels (4.4 - 5.15)
* coding style cleanups and refactoring
* reduced memory copy overhead when sending broadcasts

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-14 21:14:11 +02:00
Sven Eckelmann 7684cdd73d batman-adv: Fix build against kernel 5.10
The linux kernel 5.10 needs an explicit include of linux/if_bridge.h to
define br_multicast_list_adjacent and the struct br_ip_list.

Reported-by: Rosen Penev <rosenp@gmail.com>
Fixes: 47cd2a4b62 ("batman-adv: update to version 2021.2")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-08-22 08:56:28 +02:00
Sven Eckelmann 47cd2a4b62 batman-adv: update to version 2021.2
* support latest kernels (4.4 - 5.14)
* coding style cleanups and refactoring
* add MRD + routable IPv4 multicast with bridges support
* rewrite of broadcast queuing
* bugs squashed:

  - avoid kernel warnings on timing related checks

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-08-20 13:14:22 +02:00
Sven Eckelmann 39cf9f5b47 batman-adv: Drop compat code for Linux < 5.4
The lowest kernel version supported by OpenWrt at the moment is Linux 5.4.
It is therefore not required to have these dead code sections anymore.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-01-28 21:05:35 +01:00
Sven Eckelmann aca51f8149 batman-adv: upgrade package to latest release 2020.4
* support latest kernels (4.4 - 5.10)
* coding style cleanups and refactoring
* bugs squashed:

  - fix incorrect reroute handling of multicast packets
  - improve handling of multicast packets by bridge loop avoidance

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-10-27 14:46:11 +01:00
Sven Eckelmann bacc8c1385 batman-adv: Drop compat code for Linux < 4.14
The lowest kernel version supported by OpenWrt at the moment is Linux 4.14.
It is therefore not required to have these dead code sections anymore.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-03-07 18:50:14 +01:00
Sven Eckelmann 05da6ef2ca batman-adv: upgrade package to latest release 2020.0
* support latest kernels (3.16 - 5.6)
* coding style cleanups and refactoring
* use wifi tx rates as fallback for the B.A.T.M.A.N. V throughput estimation
* disable deprecated sysfs support by default
* bugs squashed:

  - fix crash during the scheduling of OGMs for removed interfaces

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-03-07 18:50:13 +01:00
Sven Eckelmann 5bd07eb12b batman-adv: upgrade package to latest release 2019.5
* support latest kernels (3.16 - 5.5)
* coding style cleanups and refactoring
* bugs squashed:

  - fix DAT candidate selection on little endian systems

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-12-13 22:35:12 +01:00
Sven Eckelmann 89bcb4b22f batman-adv: Drop compat-hacks for unsupported kernel versions
OpenWrt only supports kernel 4.9, 4.14 and 4.19. Older kernel versions than
4.9 therefore don't require support.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-08-01 17:30:10 +02:00
Sven Eckelmann 312fd8afc1 batman-adv: upgrade package to latest release 2019.1
* support latest kernels (3.16 - 5.1)
* coding style cleanups and refactoring
* implement meshif, hardif and vlan config interface via netlink
* snoop DHCP ACKs to improve DAT cache efficiency
* bugs squashed:

  - avoid potential reference counter underflows and use-after free errors for
    several objects
  - fix GCC warning when B.A.T.M.A.N. V is build in but cfg80211 is not
    available
  - reject too small VLAN packets before they are processed further

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-03-28 19:50:25 +01:00
Sven Eckelmann ad27ee7f9a batman-adv: Drop cfg80211_get_station memset workaround
The actual memset fix for cfg80211_get_station's sinfo is already part of
the mac80211 package and doesn't have to be shipped anymore with
batman-adv.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:40:11 +01:00
Sven Eckelmann fc37a1aa4d batman-adv: Drop compat-hack for __poll_t
__poll_t is already defined by the mac80211's backports and
doesn't have to be redefined in the compat-hacks.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:38:35 +01:00
Sven Eckelmann df9d2719fa batman-adv: Drop compat-hack for from_timer
from_timer is already defined by the mac80211's backports and
doesn't have to be redefined in the compat-hacks.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:37:54 +01:00
Sven Eckelmann ae9c14e8b0 batman-adv: Drop compat-hack for skb_put*
skb_put* is already defined by the mac80211's backports and
doesn't have to be redefined in the compat-hacks.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:35:39 +01:00
Sven Eckelmann 3f0a7c4880 batman-adv: Drop compat-hack for nla_put_u64_64bit
nla_put_u64_64bit is already defined by the mac80211's backports and
doesn't have to be redefined in the compat-hacks.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:24:40 +01:00
Sven Eckelmann 89bc1bc1a1 batman-adv: Drop compat-hack for netif_trans_update
netif_trans_update is already defined by the mac80211's backports and
doesn't have to be redefined in the compat-hacks.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:22:22 +01:00
Sven Eckelmann 502d1232f7 batman-adv: Drop redefinition of NL80211_STA_INFO_EXPECTED_THROUGHPUT
NL80211_STA_INFO_EXPECTED_THROUGHPUT is defined by the mac80211 package and
doesn't have to be redefined in the compat-hacks.h.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-22 20:19:42 +01:00
Sven Eckelmann e6fc697d41 batman-adv: upgrade package to latest release 2019.0
* support latest kernels (3.16 - 5.0)
* coding style cleanups and refactoring
* allow to enable debug tracing without full batman-adv debugfs support
* enable inconsistency reporting for most netlink dump commands
* bugs squashed:

  - avoid unnecessary kernel warning (panic) during detection of interface loops
  - work around incorrect ethernet header offset in transmit code path

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-02-02 14:04:09 +01:00
Sven Eckelmann 643e41c9d6 batman-adv: Drop manual installation of compat-hacks.h
OpenWrt is able since a while to automatically install all files in ./src/
to the PKG_BUILD_DIR. It is no longer necessary to provide special
Build/Prepare rules to do so.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2018-07-17 21:23:54 +02:00