The upcoming batman-adv 2016.2 contains multiple new features, code refactoring and similar things. These may not be fitting for Chaos Calmer but the changes in the maintenance branch (bugfixes) should be integrated to increase the stability. Signed-off-by: Sven Eckelmann <sven@narfation.org>
40 lines
1.7 KiB
Diff
40 lines
1.7 KiB
Diff
From: Simon Wunderlich <sw@simonwunderlich.de>
|
|
Date: Thu, 12 May 2016 18:52:03 +0200
|
|
Subject: [PATCH] batman-adv: replace WARN with rate limited output on non-existing VLAN
|
|
|
|
If a VLAN tagged frame is received and the corresponding VLAN is not
|
|
configured on the soft interface, it will splat a WARN on every packet
|
|
received. This is a quite annoying behaviour for some scenarios, e.g. if
|
|
bat0 is bridged with eth0, and there are arbitrary VLAN tagged frames
|
|
from Ethernet coming in without having any VLAN configuration on bat0.
|
|
|
|
The code should probably create vlan objects on the fly and
|
|
transparently transport these VLAN-tagged Ethernet frames, but until
|
|
this is done, at least the WARN splat should be replaced by a rate
|
|
limited output.
|
|
|
|
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
|
|
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
|
|
|
|
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/04792115d24408a72bf8fccd5c4059478fc15eae
|
|
---
|
|
net/batman-adv/translation-table.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
|
|
index 9b4551a..48adb91 100644
|
|
--- a/net/batman-adv/translation-table.c
|
|
+++ b/net/batman-adv/translation-table.c
|
|
@@ -650,8 +650,10 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
|
|
|
|
/* increase the refcounter of the related vlan */
|
|
vlan = batadv_softif_vlan_get(bat_priv, vid);
|
|
- if (WARN(!vlan, "adding TT local entry %pM to non-existent VLAN %d",
|
|
- addr, BATADV_PRINT_VID(vid))) {
|
|
+ if (!vlan) {
|
|
+ net_ratelimited_function(batadv_info, soft_iface,
|
|
+ "adding TT local entry %pM to non-existent VLAN %d\n",
|
|
+ addr, BATADV_PRINT_VID(vid));
|
|
kfree(tt_local);
|
|
tt_local = NULL;
|
|
goto out;
|