summaryrefslogtreecommitdiffstats
path: root/ffd/announce.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-10-08 01:16:01 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-10-08 01:16:01 +0200
commit15fbb0adbd228d40b9fafab937054f68ed2d4a16 (patch)
tree83ed99ff67f14c3b612250096e623825dcceda01 /ffd/announce.c
parenta934dcc3ce78b22a0ff4db5d353a3d8dcc2b5f1d (diff)
downloadffd-15fbb0adbd228d40b9fafab937054f68ed2d4a16.tar
ffd-15fbb0adbd228d40b9fafab937054f68ed2d4a16.zip
Handle disappearing interfaces
Diffstat (limited to 'ffd/announce.c')
-rw-r--r--ffd/announce.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffd/announce.c b/ffd/announce.c
index 6b30ec6..62e876a 100644
--- a/ffd/announce.c
+++ b/ffd/announce.c
@@ -45,7 +45,7 @@ static void maintain_nexthops(ffd_announce_t *announce) {
if (announce->selected == nexthop)
announce->selected = NULL;
- nexthop->neigh->nexthop_refs--;
+ ffd_neigh_unref(nexthop->neigh);
free(nexthop);
}
@@ -54,6 +54,11 @@ static void maintain_nexthops(ffd_announce_t *announce) {
add_interval(&nexthop->last_update, FFD_UPDATE_TIMEOUT(nexthop->interval));
}
}
+ else if (!nexthop->neigh->iface && nexthop->metric_seqno.metric != 0xffff) {
+ nexthop->metric_seqno.metric = 0xffff;
+ nexthop->last_update = now;
+ add_interval(&nexthop->last_update, FFD_UPDATE_TIMEOUT(nexthop->interval));
+ }
}
}