The current translation table mechanism is not suitable for multicast
addresses and we are currently flooding such frames anyway.
Therefore this patch prevents multicast MAC addresses being added to the
translation table.
Signed-off-by: Linus Lüssing <linus.luessing(a)web.de>
---
soft-interface.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/soft-interface.c b/soft-interface.c
index 2d1f895..9955319 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -180,7 +180,8 @@ static int batadv_interface_tx(struct sk_buff *skb,
goto dropped;
/* Register the client MAC in the transtable */
- batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif);
+ if (!is_multicast_ether_addr(ethhdr->h_source))
+ batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif);
/* don't accept stp packets. STP does not help in meshes.
* better use the bridge loop avoidance ...
--
1.7.10.4
The "early client detection" mechanism must not add clients belonging
to other backbone nodes. Such clients must be reached by directly
using the LAN instead of the mesh.
This was introduced by 724d05c8215e4e8186097121595ef20b6ba601b7
("batman-adv: detect not yet announced clients")
Reported-by: Glen Page <glen.page(a)thet.net>
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
translation-table.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/translation-table.c b/translation-table.c
index fec1a00..baae715 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -2456,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv,
{
bool ret = false;
+ /* if the originator is a backbone node (meaning it belongs to the same
+ * LAN of this node) the temporary client must not be added because to
+ * reach such destination the node must use the LAN instead of the mesh
+ */
+ if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig))
+ goto out;
+
if (!batadv_tt_global_add(bat_priv, orig_node, addr,
BATADV_TT_CLIENT_TEMP,
atomic_read(&orig_node->last_ttvn)))
--
1.8.0
hello friends
come again disturb the lords
- I have a network with openrando opewrt customized by me, here in
Brazil as jah reported in other emails, but this network is growing and
am having some difficulties that I can not solve it alone ...
my ath9k driver operates today with 802.11s (mesh) on a virtual
interface and another interface with 802.11g + n for wifi connections ..
but I'm from the beginning in 2011 fighting with routing in the network ..
AP: (config)
Attached ...
eg not know where I really run batman-adv or even whether he really
works well with HWMP ...
help me ...
This was introduced by ("batman-adv: substitute tt_poss_change with a
per-tt_entry flag")
Reported-by: Marek Lindner <lindner_marek(a)yahoo.de>
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
routing.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/routing.c b/routing.c
index 63ff456..1aa1722 100644
--- a/routing.c
+++ b/routing.c
@@ -877,11 +877,10 @@ out:
* @bat_priv: the bat priv with all the soft interface information
* @unicast_packet: the unicast header to be updated
* @dst_addr: the payload destination
- * @msg: the message to print explaining the reason of the requested re-route
*
- * Search the global translation table for dst_addr and update the unicast
- * header with the new corresponding information (originator address where the
- * destination client currently is and its known TTVN)
+ * Search the translation table for dst_addr and update the unicast header with
+ * the new corresponding information (originator address where the destination
+ * client currently is and its known TTVN)
*
* Returns true if the packet header has been updated, false otherwise
*/
--
1.8.0
Flags carried by a change_entry have to be always copied into the
client entry as they may contain important attributes (e.g.
TT_CLIENT_WIFI).
For instance, a client added by means of the "early detection
mechanism" has no flag set at the beginning, so they must be updated once the
proper ADD event is received.
This was introduced by ("batman-adv: detect not yet announced clients")
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
This patch is based on "maint"
translation-table.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/translation-table.c b/translation-table.c
index 112edd3..64c0012 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv,
*/
tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP;
+ /* the change can carry possible "attribute" flags like the
+ * TT_CLIENT_WIFI, therefore they have to be copied in the
+ * client entry
+ */
+ tt_global_entry->common.flags |= flags;
+
/* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only
* one originator left in the list and we previously received a
* delete + roaming change for this originator.
--
1.8.0
Hello David,
first of all thank you for having made us aware of the packet format problem in
batman-adv! The impact of __packed on performances was not entirely known to me,
in particular for what concerns the RISC arch.
We have to change a number of packet formats before we can remove __packed
everywhere which will obviously break compatibility.
However we already scheduled a compatibility break because we want to
heavily improve our packet formats and to provide a more flexible framework that
would allow us to add new types and features while reducing the probability of
breaking compatibility again and again as happened in the past (we are
implementing TypeLengthValue (TLV) containers among other things).
To avoid breaking compatibility (at least) twice we decided to fix now (in this
patchset) what is fixable with no consequences to compatibility while we would
ilike to defer the remaining changes for the scheduled compatibility break.
In this patchset you have the two new features intended for net-next/linux-3.8:
1) the new UNICAST_4ADDR packet type
2) the Distributed ARP Table (DAT) component
The new packet type has been reviewed to entirely address the alignment issue.
At the same time we also reviewed the other packet types but as I told you
before, we will send these changes later.
Other than that you have patch 02/12 that removes the __packed attribute from
the structures where it was not really needed.
Please, let me know if there is any problem.
Thank you very much,
Antonio
The following changes since commit 6f0a0986e328dd61610d898a09c9f4aa960ae64a:
usbnet: runtime wake up device before calling usbnet_{read|write}_cmd (2012-11-07 03:53:38 -0500)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batman-adv-for-davem
for you to fetch changes up to 9affec6be810d1d529cb9dc95126119451696ba6:
batman-adv: enable fast client detection using unicast_4addr packets (2012-11-07 20:00:24 +0100)
----------------------------------------------------------------
Included changes:
- minimal fixes to the packet layout to avoid the __packed attribute when not
needed
- new packet type called UNICAST_4ADDR: in this packet it is possible to find
both source and destination node (in the classic UNICAST header only the
destination field exists).
- a new feature: Distributed ARP Table (D.A.T.). It aims to reduce ARP lookups
latency by means of a simil-DHT approach.
----------------------------------------------------------------
Antonio Quartulli (9):
batman-adv: add UNICAST_4ADDR packet type
batman-adv: Distributed ARP Table - add a new debug log level
batman-adv: Distributed ARP Table - create DHT helper functions
batman-adv: Distributed ARP Table - implement local storage
batman-adv: Distributed ARP Table - add ARP parsing functions
batman-adv: Distributed ARP Table - add snooping functions for ARP messages
batman-adv: Distributed ARP Table - add compile option
batman-adv: Distributed ARP Table - add runtime switch
batman-adv: enable fast client detection using unicast_4addr packets
Martin Hundebøll (1):
batman-adv: Add get_ethtool_stats() support for DAT
Sven Eckelmann (2):
batman-adv: Reserve extra bytes in skb for better alignment
batman-adv: Mark correctly aligned headers not as __packed
Documentation/networking/batman-adv.txt | 3 +-
net/batman-adv/Kconfig | 10 +
net/batman-adv/Makefile | 1 +
net/batman-adv/bat_iv_ogm.c | 8 +-
net/batman-adv/debugfs.c | 20 +
net/batman-adv/distributed-arp-table.c | 1066 +++++++++++++++++++++++++++++++
net/batman-adv/distributed-arp-table.h | 167 +++++
net/batman-adv/hard-interface.c | 3 +
net/batman-adv/icmp_socket.c | 4 +-
net/batman-adv/main.c | 9 +
net/batman-adv/main.h | 13 +-
net/batman-adv/originator.c | 2 +
net/batman-adv/packet.h | 68 +-
net/batman-adv/routing.c | 51 +-
net/batman-adv/send.c | 4 +
net/batman-adv/soft-interface.c | 28 +-
net/batman-adv/sysfs.c | 7 +
net/batman-adv/translation-table.c | 20 +-
net/batman-adv/types.h | 73 +++
net/batman-adv/unicast.c | 135 +++-
net/batman-adv/unicast.h | 36 +-
net/batman-adv/vis.c | 9 +-
22 files changed, 1682 insertions(+), 55 deletions(-)
create mode 100644 net/batman-adv/distributed-arp-table.c
create mode 100644 net/batman-adv/distributed-arp-table.h