From a8e7f4bc38c4a90ee308cd7f1f8604f71db59d05 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Sun, 12 Dec 2010 21:57:10 +0000 Subject: batman-adv: protect neighbor nodes with reference counters Signed-off-by: Marek Lindner --- net/batman-adv/originator.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'net/batman-adv/originator.h') diff --git a/net/batman-adv/originator.h b/net/batman-adv/originator.h index 8019fbd..88e5c60 100644 --- a/net/batman-adv/originator.h +++ b/net/batman-adv/originator.h @@ -26,9 +26,11 @@ int originator_init(struct bat_priv *bat_priv); void originator_free(struct bat_priv *bat_priv); void purge_orig_ref(struct bat_priv *bat_priv); struct orig_node *get_orig_node(struct bat_priv *bat_priv, uint8_t *addr); -struct neigh_node * -create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, - uint8_t *neigh, struct batman_if *if_incoming); +struct neigh_node *create_neighbor(struct orig_node *orig_node, + struct orig_node *orig_neigh_node, + uint8_t *neigh, + struct batman_if *if_incoming); +void neigh_node_free_ref(struct kref *refcount); int orig_seq_print_text(struct seq_file *seq, void *offset); int orig_hash_add_if(struct batman_if *batman_if, int max_if_num); int orig_hash_del_if(struct batman_if *batman_if, int max_if_num); -- cgit v1.1