The Module.symvers with the exported symbols of all other kernel modules in
OpenWrt is usually placed in the main source directory of the package. But
the actual sources for batman-adv are found in net/batman-adv. OpenWrt must
therefore be informed to move it to this subdirectory or otherwise modpost
will fail to find the symbols
WARNING: "cfg80211_get_station" [.../batman-adv-2018.3/net/batman-adv/batman-adv.ko] undefined!
The dependency will then be missing in the .modinfo depends= option and
thus it the kernel module loader will not correctly load the cfg80211.ko
during bootup.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.16 - 4.19)
* coding style cleanups and refactoring
* enable the DAT by default for the in-tree Linux module
* bugs squashed:
- fix segfault when writing to sysfs files under batman_adv/ with
CONFIG_BATMAN_ADV_DEBUG enabled
- avoid information leakage in probe ELP packets
- adjust reference counters when queue_work fails
- prevent duplicated entries in various lists
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.16 - 4.18)
* dropped support for kernels < 3.16 (note the removed build directory)
* coding style cleanups and refactoring
* avoid old nodes disabling multicast optimizations completely
* disable ethtool based B.A.T.M.A.N. V speed detection for virtual interfaces
* enable B.A.T.M.A.N. V compilation by default
* disable debugfs support by default
* bugs squashed:
- fix TT sync flags for intermediate TT responses
- avoid race in TT TVLV allocator helper
- prevent TT request storms by not sending inconsistent TT TVLVs
- fix best gw refcnt after netlink dump
- adjust debugfs paths for interfaces after a namechange
- fix single entry TT non-sync flag storage
- fix multicast TT issues with bogus ROAM flags
- work around insufficient memory initialization in cfg80211's station info
Signed-off-by: Sven Eckelmann <sven@narfation.org>
It is not necessary to install each file manually to the target path. A
simple recursive copy is enough.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The path $(BUILD_DIR)/$(PKG_NAME) is not used anymore. The rule can be
removed and the OpenWrt build system takes care of the removal of the build
directory.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
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>
cfg80211 is loaded by kmodloader after the modules with a priority
(AutoLoad) are loaded. batman-adv should therefore also be loaded at that
time and must not load cfg80211 itself. The information in the ELF header
are enough for kmodloader to load these two modules in the correct order.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.2 - 4.17)
* coding style cleanups and refactoring
* add DAT cache and multicast flags netlink support
* avoid redundant multicast TT entries
* bugs squashed:
- update data pointers after skb_cow()
- fix header size check in batadv_dbg_arp()
- fix skbuff rcsum on packet reroute
- fix multicast-via-unicast transmission with AP isolation
- fix packet loss for broadcasted DHCP packets to a server
- fix multicast packet loss with a single WANT_ALL_IPV4/6 flag
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.2 - 4.16)
* coding style cleanups and refactoring
* mark licenses clearer, change UAPI header from ISC to MIT
* bugs squashed:
- fix packet checksum handling in receive path
- fix handling of large number of interfaces
- fix netlink dumping of gateways and BLA claims+backbones
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This patch fixes an issue in the translation table code potentially
leading to a TT Request + Response storm. The issue may occur for nodes
involving BLA and an inconsistent configuration of the batman-adv AP
isolation feature. However, since the new multicast optimizations, a
single, malformed packet may lead to a mesh-wide, persistent
Denial-of-Service, too.
The issue occurs because nodes are currently OR-ing the TT sync flags of
all originators announcing a specific MAC address via the
translation table. When an intermediate node now receives a TT Request
and wants to answer this on behave of the destination node then this
intermediate node now responds with an altered flag field and broken
CRC. The next OGM of the real destination will lead to a CRC mismatch
and triggering a TT Request and Response again.
Furthermore, the OR-ing is currently never undone as long as at least
one originator announcing the according MAC address remains, leading to
the potential persistency of this issue.
This patch fixes this issue by storing the flags used in the CRC
calculation on a a per TT orig entry basis to be able to respond with
the correct, original flags in an intermediate TT Response for one
thing. And to be able to correctly unset sync flags once all nodes
announcing a sync flag vanish for another.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.2 - 4.12)
* bridge loop avoidance improvements for various corner cases
* reduction of maximum fragment size
* coding style cleanups and refactoring
* bugs squashed:
- fix rx packet/bytes stats on local DAT ARP reply
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.2 - 4.11)
* remove bridge loop avoidance addresses from translation table
* allow to build B.A.T.M.A.N. V without cfg80211 integration on Linux <
* 3.16
* coding style cleanups and refactoring
* bugs squashed:
- fix interface reference counter on fragmentation errors
- avoid double free on fragment merge error
- fix support for up to 16 fragments
- fix build of multicast compatibility code on some architectures
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Fix double free during fragment merge error
* batman-adv: Fix transmission of final, 16th fragment
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The new setting for aggregated_ogms was read from the correct config key.
But the setting was applied to the wrong file. Also the value to set was
not read from the correct variable.
Reported-by: Edward Beech <initialed85@gmail.com>
Fixes: 2d654c0af1 ("batman-adv: upgrade package to latest release 2012.0.0")
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
The batman-adv Makefile set a PKG_BUILD_DIR outside of KERNEL_BUILD_DIR;
this could lead to batman-adv not being rebuilt when switching targets and
thus kernel configurations. This resulted in ABI mismatches and
occasionally broke the build with messages like the following:
Package kmod-batman-adv is missing dependencies for the following libraries:
crc16.ko
Instead of setting a better PKG_BUILD_DIR ourselves, we can just remove
the explicit PKG_BUILD_DIR definition and include kernel.mk before
package.mk to get the default definition used by other kernel module
packages.
Reported-by: David Lutz <kpanic@hirnduenger.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Marek Lindner forwarded all recent requests regarding the package changes
to Simon. He also asked that further changes should be handled directly
without waiting for him.
Simon Wunderlich already has write access to the repository and is
therefore well prepared to take over the role of the maintainer.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* 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>
* batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv
* batman-adv: Revert "fix splat on disabling an interface"
* batman-adv: Detect missing primaryif during tp_send as error
* batman-adv: Check for alloc errors when preparing TT local data
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The CONFIG_MODULE_STRIPPED hack broke some time ago, as it is undefined too
late (after the headers using it have been included by compat-hacks.h).
Undefine CONFIG_MODULE_STRIPPED at the top of compat-hacks.h instead to
make the module version available to batctl again.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
The build of netlink.c in batman-adv 2016.3 will fail because the
definition of GENL_NAMESIZE and similar things are missing. This is is
caused by an incorrect order of backports and non-backports header files
mixed up with uapi and non-uapi header files. Parts of the header files
would not get included by include_next because it not anymore in the
remaining search paths.
Reported: Marek Lindner <marek.lindner@open-mesh.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
The entire batman-adv code relies on the kernel backports introduced
by the mac80211 package.
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
The content of this file should actually be included somehow in
backport.git so it will become part of the mac80211 package. Still keep
this for now in a separate file so it is easier to extract them.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
BATMAN_V (in the upcoming release) will use structures from the mac80211
package. These structures can be incompatible to the structures defined in
the header of the kernel. This can lead to weird problems like stack
overflows or memory corruptions.
To avoid this, the batman-adv has to be compiled against the mac80211
headers instead of the kernel headers. But this requires that the
compatibility headers of compat-wireless are used. So the batman-adv
compatibility layer has (mostly) be removed and instead the
compat-wireless/mac80211 compat layer has to be used.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
open-mesh.org and its subdomains can only be accessed via HTTPS. HTTP-only
requests are currently redirected automatically to HTTPS but references
to it should be only https.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
The configuration file of batman-adv should be marked as such to avoid that the
old configuration options are overwritten when it is upgraded.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
With the introduction of the Extended Isolation component[1]
a new option is required by batman-adv: the isolation_mark.
This patch adds support for it in the configuration file
[1] http://www.open-mesh.org/projects/batman-adv/wiki/Extended-isolation
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
The 'crc16' kernel lib is still needed/used by the BLA framework
(Bridge Loop Avoidance) in bridge_loop_avoidance.c. Thanks to
Antonio 'ordex' Quartulli for confirmation.
Introduced by 1ee5b17e4f
("upgrade package to latest release 2014.0.0").
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>