diff options
Diffstat (limited to 'ffd/neigh.c')
-rw-r--r-- | ffd/neigh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ffd/neigh.c b/ffd/neigh.c index 9788d3f..02a3318 100644 --- a/ffd/neigh.c +++ b/ffd/neigh.c @@ -64,6 +64,9 @@ uint16_t ffd_neigh_get_rxcost(const ffd_neigh_t *neigh) { } uint16_t ffd_neigh_get_cost(const ffd_neigh_t *neigh) { + if (!neigh) /* self */ + return 0; + uint16_t txcost = neigh->txcost; if (txcost < 256) txcost = 256; @@ -77,5 +80,5 @@ uint16_t ffd_neigh_get_cost(const ffd_neigh_t *neigh) { } void ffd_neigh_reset(ffd_iface_t *iface, ffd_neigh_t *neigh) { - ffd_send_announce_request(iface, neigh, FFD_NODE_ID_UNSPEC, 0, 0); + ffd_send_announce_request(iface, neigh, FFD_NODE_ID_UNSPEC, 0, 0, true /* XXX change this later */); } |