| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The automatic recalculation of the maximum allowed MTU is usually triggered
by code sections which are already rtnl lock protected by callers outside
of batman-adv. But when the fragmentation setting is changed via
batman-adv's own batadv genl family, then the rtnl lock is not yet taken.
But dev_set_mtu requires that the caller holds the rtnl lock because it
uses netdevice notifiers. And this code will then fail the check for this
lock:
RTNL: assertion failed at net/core/dev.c (1953)
Fixes: 12577be7ed67 ("batman-adv: Merge bugfixes from 2023.2")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Broken sync while rescheduling delayed work
* compat: Use native kstrtox.h for 5.10.185
* Do not get eth header before batadv_check_management_packet
* Trigger events for auto adjusted MTU
* Don't increase MTU when set by user
* Fix TT global entry leak when client roamed back
* Fix batadv_v_ogm_aggr_send memory leak
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
| |
* Fix hang up with small MTU hard-interface
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
| |
The buildsystem doesn't know that the KernelPackage/*/config kconfig
symbols are related to the batman-adv package build. It is necessary to
explicitly define it via PKG_CONFIG_DEPENDS.
Fixes: 522ce8dfdb7f ("batman-adv: rename folder name to match project & package name")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
| |
* Request iflink once in batadv-on-batadv check
* Request iflink once in batadv_get_real_netdevice
* Don't expect inter-netns unique iflink indices
* Don't skb_split skbuffs with frag_list
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eric Dumazet changed the mc_forwarding in commit 145c7a793838 ("ipv6: make
mc_forwarding atomic") the type of mc_forwarding from __s32 to an atomic_t.
This patch was then ported to various stable kernels.
This code change caused a FTBFS when in batman-adv when
CONFIG_BATMAN_ADV_MCAST was activated. To work around this problem, provide
a version for kernels with __s32 mc_forwarding and a version for kernel
with atomic_t mc_forwarding.
Fixes: #850
Reported-by: Huangbin Zhan <zhanhb88@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
| |
The build system of this package is written in a way that it is safe to run
the make steps in parallel. The build time can be reduced slightly on
modern systems.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (4.9 - 5.17)
* dropped support for kernels < 4.9
* coding style cleanups and refactoring
* allow netlink usage in unprivileged containers
* bugs squashed:
- don't send link-local multicast to mcast routers
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |\
| |
| | |
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>
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea of musl introduced the
macros __LITTLE_ENDIAN and __BIG_ENDIAN in alltypes.h. These are pulled
into the compilation of batman-adv. This has the side effect that the
function is_multicast_ether_addr of etherdevice.h in Linux kernel is
compiled as the big endian version and so fails to work properly on
little endian devices.
This commits prevents pulling in header files of musl libc similar to
OpenWRT commit 9ac47ee46918c45b91f4e4d1fa76b1e26b9d57fe
Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
| |
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: 47cd2a4b627d ("batman-adv: update to version 2021.2")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
The test builds are now requiring quilt refreshed patches instead of git
patches. Otherwise the build check will not even try to build something.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The batman-adv netlink messages often contain the interface index and
interface name in the same message. This makes it easy for the receiver to
operate on the incoming data when it either needs to print something or
needs to operate on the interface index.
But one of the attributes was missing for:
* neighbor table dumps
* originator table dumps
* gateway list dumps
* query of hardif information
* query of vid information
The userspace therefore had to implement special workarounds using
SIOCGIFNAME or SIOCGIFINDEX depending on what was actually provided.
Providing both information simplifies the userspace code massively without
adding a lot of extra overhead in the kernel portion.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
| |
* support latest kernels (4.4 - 5.13)
* coding style cleanups and refactoring
* bugs squashed:
- correctly initialize padding when sending out translation table TVLVs
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
Use `$(AUTORELEASE)` variable rather than setting a PKG_RELEASE
on every commit manually.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (4.4 - 5.11)
* coding style cleanups and refactoring
* drop support for sysfs+debugfs
* allow to select routing algorithm during creation of interface
* bugs squashed:
- allocate enough reserved room on fragments for lower devices
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (4.4 - 5.9)
* coding style cleanups and refactoring
* introduce a configurable per interface hop penalty
* bugs squashed:
- avoid uninitialized chaddr when handling DHCP
- fix own OGMv2 check in aggregation receive handling
- fix "NOHZ: local_softirq_pending 08" warnings caused by BLA
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
| |
* support latest kernels (4.4 - 5.8)
* coding style cleanups and refactoring
* dropped support for kernels < 4.4
* re-enabled link speed detection for interfaces without auto negotiation
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
| |
The mac80211 headers might depend on the actual configuration of mac80211
to generate an ABI compatible structure definition. batman-adv must
therefore include the header with these config definitions.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
| |
It is easier to use the global define than to manually keep track of the
changes in the various kernel module makefiles in the main OpenWrt
repository and feeds.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (3.16 - 5.7-rc2)
* coding style cleanups and refactoring
* bugs squashed:
- fix reference leaks in throughput_override sysfs file
- fix reference leak in B.A.T.M.A.N. V OGM error handling
- fix network coding random weighting
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
The compat-sources are no longer needed for kernels >= 4.4. Older kernel
versions are not used since a while in OpenWrt.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
| |
The OpenWrt routing feed was tried to be merged together with the OpenWrt
package feed. But they ended up being rejected due to formalities like the
slightly different package template. Just moving to the OpenWrt package
based one should simplify similar approaches in the future.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
The SUBDIRS variable has been removed in kernel 5.4 and M or KBUILD_EXTMOD
has to be used instead.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |\
| |
| | |
batman-adv and friends: improve version string
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the package version string so it does not start
with "openwrt", but with the base version we are modifying:
So far: openwrt-2019.4-1
Now: 2019.4-openwrt-1
Since it's us modifying version 2019.4 (in this case), this order
is more convenient (and also closer to what the kernel version
string does).
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
| |/
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (3.16 - 5.4)
* coding style cleanups and refactoring
* implement aggregation of OGM2 packets
* bugs squashed:
- fix length validation in netlink messages
- fix out of buffer read when parsing aggregated packets
- avoid race condition in OGM(2) packet modification and submission
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
| |
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (3.16 - 5.3)
* coding style cleanups and refactoring
* add routable multicast optimizations
* bugs squashed:
- fix duplicated OGMs on NETDEV_UP
- fix dumping of multicast flags
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The '-m' option to select the mesh interface or vlan interfaces was
replaced with device type specific subcommand prefixes:
* meshif <netdev>
* vlan <vdev>
* meshif <netdev> vid <vid>
* hardif <netdev>
This change should also be made in the proto script to allow batctl to drop
the support of '-m' completely in the future.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
The mac80211 package version was updated to a 5.2 based one in commit
0b2c42ced21a ("mac80211: Update to version 5.2-rc7"). The batman-adv module
must therefore no longer the pre-5.2 API.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
| |
The ap_isolation setting only supports boolean values. So setting an empty
string as ap_isolation is not supported by batctl.
Fixes: f5205d7d2434 ("batman-adv: upgrade package to latest release 2014.2.0")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
B.A.T.M.A.N. V support additional settings which are hardif specific. The
batadv_hardif proto has to expose them to allow automatic configuration.
The default configuration would be:
config interface 'bat0_hardif_eth0'
option proto 'batadv_hardif'
option master 'bat0'
option ifname 'eth0'
option mtu '1536'
option 'elp_interval' 500
# string like '1mbit' is accepted instead of kbit for override
option 'throughput_override' '0'
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The state of slave interfaces are handled differently depending on whether
the interface is up or not. All active interfaces (IFF_UP) will transmit
OGMs. But for B.A.T.M.A.N. IV, also non-active interfaces are scheduling
(low TTL) OGMs on active interfaces. The code which setups and schedules
the OGMs must therefore already be called when the interfaces gets added as
slave interface and the transmit function must then check whether it has to
send out the OGM or not on the specific slave interface.
But v2016.3 moved the setup code from the enable function to the activate
function. The latter is called either when the added slave was already up
when batadv_hardif_enable_interface processed the new interface or when a
NETDEV_UP event was received for this slave interfac. As result, each
NETDEV_UP would schedule a new OGM worker for the interface and thus OGMs
would be send a lot more than expected.
Fixes: 549909f89dd7 ("batman-adv: upgrade package to latest release 2016.3")
Reported-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* support latest kernels (3.16 - 5.2)
* coding style cleanups and refactoring
* implement multicast-to-unicast support for multiple targets
* deprecate sysfs support and make it optional
* refresh DAT entry timeouts on incoming ARP Replies
* bugs squashed:
- fix multicast tt/tvlv worker locking
- drop roam tvlv handler when unregistering mesh interface
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
| |
Although batman-adv config is cycled in config_foreach, changes
are made in the network config. Thus, this one has to be committed.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
batman-adv allows to configure three different objects:
* batadv hardif
- network interface used by batadv meshif to transport the batman-adv
packets
- its master interface is set to the batadv meshif
* batadv (meshif/softif)
- virtual interface that emulates a normal 802.3 interface on top
- encapsulates traffic and forwards it via the batadv hardifs
* batadv vlan
- potential VLAN ID on top of batadv meshif
- allows filtering of traffic from specific VIDs
While batadv vlan objects were already represented as an own proto
"batadv_vlan", the batadv meshif could never be fully configured using
/etc/config/network. Instead, parts of its configuration were stored in
/etc/config/batman_adv and some in the interfaces with the "batadv" proto.
To increase the confusion, the "batadv" proto wasn't used to define the
batadv meshif but to identify batadv (slave) hardifs. The batman-adv
meshifs were also never created directly but only when a hardif was
configured. The actual modification of the configuration settings was then
applied using a hotplug script hack. The batadv meshif network interface
could therefore only be created when an hardif was available and not
manipulated with ifup/ifdown. Also `/etc/init.d/network reload` didn't
modify the batadv meshif interface configuration correctly.
The "batadv" is now renamed to "batadv_hardif" and a new "batadv" proto is
used to configure the main (meshif) network interface with all its
configuration.
A simple network configuration with WiFi & ethernet interfaces and static
IP on top of bat0 would look like:
# batadv meshif bat0
config interface 'bat0'
option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms 1
option ap_isolation 0
option bonding 0
option fragmentation 1
#option gw_bandwidth '10000/2000'
option gw_mode 'off'
#option gw_sel_class 20
option log_level 0
option orig_interval 1000
option bridge_loop_avoidance 1
option distributed_arp_table 1
option multicast_mode 1
option network_coding 0
option hop_penalty 30
option isolation_mark '0x00000000/0x00000000'
# add *single* wifi-iface with network bat0_hardif_wlan as hardif to bat0
config interface 'bat0_hardif_wlan'
option mtu '1536'
option proto 'batadv_hardif'
option master 'bat0'
# option ifname is filled out by the wifi-iface
# add eth0 as hardif to bat0
config interface 'bat0_hardif_eth0'
option proto 'batadv_hardif'
option master 'bat0'
option ifname 'eth0'
option mtu '1536'
# configure IP on bat0
config interface 'bat0_lan'
option ifname 'bat0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|