summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-06-30 20:01:19 +0200
committerAntonio Quartulli <ordex@autistici.org>2012-11-07 20:00:20 +0100
commit2f1dfbe185075a50dc8f0490a136377af53a1c62 (patch)
tree45ade201ca4b63e4409fc21567db0f750abc8bc7 /net/batman-adv/main.c
parent785ea1144182c341b8b85b0f8180291839d176a8 (diff)
downloadlinux-2f1dfbe185075a50dc8f0490a136377af53a1c62.tar.bz2
batman-adv: Distributed ARP Table - implement local storage
Since batman-adv cannot inter-operate with the host ARP table, this patch introduces a batman-adv private storage for ARP entries exchanged within DAT. This storage will represent the node local cache in the DAT protocol. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r--net/batman-adv/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index afc07a865be4..dc33a0c484a4 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -29,6 +29,7 @@
#include "hard-interface.h"
#include "gateway_client.h"
#include "bridge_loop_avoidance.h"
+#include "distributed-arp-table.h"
#include "vis.h"
#include "hash.h"
#include "bat_algo.h"
@@ -128,6 +129,10 @@ int batadv_mesh_init(struct net_device *soft_iface)
if (ret < 0)
goto err;
+ ret = batadv_dat_init(bat_priv);
+ if (ret < 0)
+ goto err;
+
atomic_set(&bat_priv->gw.reselect, 0);
atomic_set(&bat_priv->mesh_state, BATADV_MESH_ACTIVE);
@@ -155,6 +160,8 @@ void batadv_mesh_free(struct net_device *soft_iface)
batadv_bla_free(bat_priv);
+ batadv_dat_free(bat_priv);
+
free_percpu(bat_priv->bat_counters);
atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE);