diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c index acea7db365034db6d474c4feb649b70be66579d1..c730fdb8250a49f1ba2f5a6b14757dfdb2b15930 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c @@ -152,7 +152,11 @@ static inline _nib_onl_entry_t *_cache_out_onl_entry(const ipv6_addr_t *addr, /* no new entry created yet, get next entry in FIFO */ tmp = (_nib_onl_entry_t *)clist_lpop(&_next_removable); } - } while ((tmp != first) && (res != NULL)); + } while ((tmp != first) && (res == NULL)); + if (res == NULL) { + /* we did not find any removable entry => requeue current one */ + clist_rpush(&_next_removable, (clist_node_t *)tmp); + } return res; }