Signed-off-by: Steven Barth <steven@midlink.org>
}
-struct odhcp6c_entry* odhcp6c_find_entry(enum odhcp6c_state state, const struct odhcp6c_entry *new)
+static struct odhcp6c_entry* odhcp6c_find_entry(enum odhcp6c_state state, const struct odhcp6c_entry *new)
{
- size_t len, cmplen = offsetof(struct odhcp6c_entry, target) + new->length / 8;
+ size_t len, cmplen = offsetof(struct odhcp6c_entry, target) + ((new->length + 7) / 8);
struct odhcp6c_entry *start = odhcp6c_get_state(state, &len);
struct odhcp6c_entry *x = NULL;
void* odhcp6c_get_state(enum odhcp6c_state state, size_t *len);
// Entry manipulation
-struct odhcp6c_entry* odhcp6c_find_entry(enum odhcp6c_state state, const struct odhcp6c_entry *new);
bool odhcp6c_update_entry(enum odhcp6c_state state, struct odhcp6c_entry *new, uint32_t safe, bool filterexcess);
void odhcp6c_expire(void);