summaryrefslogtreecommitdiffstats
path: root/ffd/neigh.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-10-21 00:13:59 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-10-21 00:13:59 +0200
commita4986182dcad508c17a6eb8fd3e556f18cfaa349 (patch)
treea22547d59353d36edfc4e473c4032ed9f11b3603 /ffd/neigh.c
parentc3a0c36d3c935097ccc72d92581f0f2b7bc794a9 (diff)
downloadffd-a4986182dcad508c17a6eb8fd3e556f18cfaa349.tar
ffd-a4986182dcad508c17a6eb8fd3e556f18cfaa349.zip
Implement retransmits of important updates
Diffstat (limited to 'ffd/neigh.c')
-rw-r--r--ffd/neigh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffd/neigh.c b/ffd/neigh.c
index 1b0d41d..2c73362 100644
--- a/ffd/neigh.c
+++ b/ffd/neigh.c
@@ -55,6 +55,11 @@ void ffd_neigh_unref_list(ffd_neigh_t *neigh) {
}
}
+void ffd_neigh_unref(ffd_neigh_t *neigh) {
+ if (!(--neigh->ref) && !neigh->iface)
+ free(neigh);
+}
+
uint16_t ffd_neigh_get_rxcost(const ffd_neigh_t *neigh) {
if (!neigh->hello_log || !neigh->hello_interval || !neigh->iface)
return 0xffff;