[PATCH AUTOSEL 5.5 05/84] batman-adv: Don't schedule OGM for disabled interface
by Sasha Levin
From: Sven Eckelmann <sven(a)narfation.org>
[ Upstream commit 8e8ce08198de193e3d21d42e96945216e3d9ac7f ]
A transmission scheduling for an interface which is currently dropped by
batadv_iv_ogm_iface_disable could still be in progress. The B.A.T.M.A.N. V
is simply cancelling the workqueue item in an synchronous way but this is
not possible with B.A.T.M.A.N. IV because the OGM submissions are
intertwined.
Instead it has to stop submitting the OGM when it detect that the buffer
pointer is set to NULL.
Reported-by: syzbot+a98f2016f40b9cd3818a(a)syzkaller.appspotmail.com
Reported-by: syzbot+ac36b6a33c28a491e929(a)syzkaller.appspotmail.com
Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Cc: Hillf Danton <hdanton(a)sina.com>
Signed-off-by: Simon Wunderlich <sw(a)simonwunderlich.de>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/batman-adv/bat_iv_ogm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 5b0b20e6da956..d88a4de022372 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -789,6 +789,10 @@ static void batadv_iv_ogm_schedule_buff(struct batadv_hard_iface *hard_iface)
lockdep_assert_held(&hard_iface->bat_iv.ogm_buff_mutex);
+ /* interface already disabled by batadv_iv_ogm_iface_disable */
+ if (!*ogm_buff)
+ return;
+
/* the interface gets activated here to avoid race conditions between
* the moment of activating the interface in
* hardif_activate_interface() where the originator mac is set and
--
2.20.1
2 years, 2 months
batman-adv gateway issue
by Maksim Iushchenko
Hello,
I use batman-adv to create a mesh network and recently I faced an
issue related to batman-adv gateways.
I have a mesh network based on batman-adv. Each node in my network has
certain coordinates. Each node uses these coordinates to generate it's
own IPv6 address and sets it to bat0 interface. Therefore, network's
node has a static IPv6 address contains encoded coordinates.
The purpose is to provide an Internet access to all mesh network nodes
via gateway node. I already configured gateway node as gateway server
and all rest nodes as gateway client. But in my case each gateway
client wants to know default route to the gateway node and, in
particular, it's IP-address.
Please, suggest me how can I distribute default route to all nodes in
the mesh network in the case where nodes have static IPv6-addresses
(and also it is necessary to maintain the actual default gateway on
the nodes). Or, please, suggest me how is better to provide an
Internet access to all nodes and distribute their coordinates in the
network.
Thanks in advance
2 years, 2 months
[PATCH 0/1] pull request for net: batman-adv 2020-03-06
by Simon Wunderlich
Hi David,
here is a bugfix which we would like to have integrated into net.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9:
Linux 5.6-rc1 (2020-02-09 16:08:48 -0800)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-net-for-davem-20200306
for you to fetch changes up to 8e8ce08198de193e3d21d42e96945216e3d9ac7f:
batman-adv: Don't schedule OGM for disabled interface (2020-02-18 09:07:55 +0100)
----------------------------------------------------------------
Here is a batman-adv bugfix:
- Don't schedule OGM for disabled interface, by Sven Eckelmann
----------------------------------------------------------------
Sven Eckelmann (1):
batman-adv: Don't schedule OGM for disabled interface
net/batman-adv/bat_iv_ogm.c | 4 ++++
1 file changed, 4 insertions(+)
2 years, 2 months
[PATCH 0/3] pull request for net-next: batman-adv 2020-03-06
by Simon Wunderlich
Hi David,
here is a small cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9:
Linux 5.6-rc1 (2020-02-09 16:08:48 -0800)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20200306
for you to fetch changes up to 5f27eb055d5c5814785fb9cf0ae4a4c150a8f334:
batman-adv: Replace zero-length array with flexible-array member (2020-02-17 22:43:42 +0100)
----------------------------------------------------------------
This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- Avoid RCU list-traversal in spinlock, by Sven Eckelmann
- Replace zero-length array with flexible-array member,
by Gustavo A. R. Silva
----------------------------------------------------------------
Gustavo A. R. Silva (1):
batman-adv: Replace zero-length array with flexible-array member
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (1):
batman-adv: Avoid RCU list-traversal in spinlock
net/batman-adv/distributed-arp-table.c | 2 +-
net/batman-adv/main.h | 2 +-
net/batman-adv/translation-table.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
2 years, 2 months