aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-06-25 21:37:18 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-11-07 14:00:21 -0500
commitc384ea3ec930ef11060a7308fbbd02b4871384f9 (patch)
tree14764f1a722c0a5633aa9dc5cebc19081703d446 /net/batman-adv/send.c
parent5c3a0e5535933349a5d6e6bc8b704e0611f21d3f (diff)
batman-adv: Distributed ARP Table - add snooping functions for ARP messages
In case of an ARP message going in or out the soft_iface, it is intercepted and a special action is performed. In particular the DHT helper functions previously implemented are used to store all the ARP entries belonging to the network in order to provide a fast and unicast lookup instead of the classic broadcast flooding mechanism. Each node stores the entries it is responsible for (following the DHT rules) in its soft_iface ARP table. This makes it possible to reuse the kernel data structures and functions for ARP management. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r--net/batman-adv/send.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 570a8bce0364..660d9bf7d219 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -18,6 +18,7 @@
18 */ 18 */
19 19
20#include "main.h" 20#include "main.h"
21#include "distributed-arp-table.h"
21#include "send.h" 22#include "send.h"
22#include "routing.h" 23#include "routing.h"
23#include "translation-table.h" 24#include "translation-table.h"
@@ -209,6 +210,9 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
209 if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_DEACTIVATING) 210 if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_DEACTIVATING)
210 goto out; 211 goto out;
211 212
213 if (batadv_dat_drop_broadcast_packet(bat_priv, forw_packet))
214 goto out;
215
212 /* rebroadcast packet */ 216 /* rebroadcast packet */
213 rcu_read_lock(); 217 rcu_read_lock();
214 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { 218 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {