summaryrefslogtreecommitdiffstats
path: root/lib/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cache.c')
-rw-r--r--lib/cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/cache.c b/lib/cache.c
index 960459d..f0a626c 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -438,7 +438,9 @@ static int __cache_add(struct nl_cache *cache, struct nl_object *obj)
obj->ce_cache = cache;
if (cache->hashtable) {
- ret = nl_hash_table_add(cache->hashtable, obj);
+ ret = _nl_hash_table_add(cache->hashtable, obj,
+ (obj->ce_msgflags & NLM_F_APPEND) ||
+ (obj->ce_flags & NL_OBJ_DUMP));
if (ret < 0) {
obj->ce_cache = NULL;
return ret;