[B.A.T.M.A.N.] [RFC 20/23] batman-adv: B.A.T.M.A.N. V - implement bat_neigh_free() API

Antonio Quartulli
2014-02-11T12:48:20Z

From: Antonio Quartulli <antonio@open-mesh.com>

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
bat_v.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/bat_v.c b/bat_v.c
index 5681d19..3e4575d 100644
--- a/bat_v.c
+++ b/bat_v.c
@@ -63,6 +63,12 @@ static void batadv_v_ogm_emit(struct batadv_forw_packet *forw_packet)
{
}

+static void batadv_v_neigh_free(struct batadv_neigh_node *neigh)
+{
+ batadv_elp_neigh_node_free_ref(neigh->bat_v.elp_neigh);
+ neigh->bat_v.elp_neigh = NULL;
+}
+
static struct batadv_algo_ops batadv_batman_v __read_mostly = {
.name = "BATMAN_V",
.bat_iface_enable = batadv_v_iface_enable,
@@ -71,6 +77,7 @@ static struct batadv_algo_ops batadv_batman_v __read_mostly = {
.bat_primary_iface_set = batadv_v_primary_iface_set,
.bat_ogm_emit = batadv_v_ogm_emit,
.bat_ogm_schedule = batadv_v_ogm_schedule,
+ .bat_neigh_free = batadv_v_neigh_free,
};

int batadv_v_mesh_init(struct batadv_priv *bat_priv)
--
1.8.5.3