[PATCH] nl_object_clone: properly clone ce_mask field

Alexander Sack asac at ubuntu.com
Sat Jul 4 19:56:59 EDT 2009


based on my finding, ce_mask needs to be identical on clones; otherwise
some functions (like "dump") will treat clones differently.

---
 lib/object.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/object.c b/lib/object.c
index fb44247..46d8141 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -108,6 +108,7 @@ struct nl_object *nl_object_clone(struct nl_object *obj)
 
 	new->ce_ops = obj->ce_ops;
 	new->ce_msgtype = obj->ce_msgtype;
+	new->ce_mask = obj->ce_mask;
 
 	if (size)
 		memcpy((void *)new + doff, (void *)obj + doff, size);
-- 
1.6.3.3




More information about the libnl mailing list