diff options
author | Thomas Haller <thaller@redhat.com> | 2022-03-14 23:01:12 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-14 23:06:48 (GMT) |
commit | e0b240611ce2d3c3c15f1e15a12031d31ba7e658 (patch) | |
tree | 805b5b5a1305f7f583090bb2b241fbc4588ff051 /lib/route | |
parent | d78a6eb73e3d3e4e3e35aa3e6d3e5cacc8265644 (diff) | |
download | libnl-e0b240611ce2d3c3c15f1e15a12031d31ba7e658.zip libnl-e0b240611ce2d3c3c15f1e15a12031d31ba7e658.tar.gz libnl-e0b240611ce2d3c3c15f1e15a12031d31ba7e658.tar.bz2 |
route/mdb: drop setting ifindex in mdb_clone()
The default implementation of oo_clone() already clones the object
using memcpy(). So simple fields (like ifindex) are correct. What
is not correct (and for what we need the oo_clone() implementation)
are pointer values which require a deep clone.
Diffstat (limited to 'lib/route')
-rw-r--r-- | lib/route/mdb.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/route/mdb.c b/lib/route/mdb.c index 3949bc4..b557cee 100644 --- a/lib/route/mdb.c +++ b/lib/route/mdb.c @@ -107,9 +107,6 @@ static int mdb_clone(struct nl_object *_dst, struct nl_object *_src) struct rtnl_mdb *src = nl_object_priv(_src); struct rtnl_mdb_entry *entry; - if (src->ifindex) - dst->ifindex = src->ifindex; - nl_init_list_head(&dst->mdb_entry_list); nl_list_for_each_entry(entry, &src->mdb_entry_list, mdb_list) { struct rtnl_mdb_entry *copy = mdb_entry_clone(entry); |