]> granicus.if.org Git - libnl/commitdiff
Fix clone() of AF specific link data
authorThomas Graf <tgraf@suug.ch>
Thu, 21 Apr 2011 12:46:06 +0000 (14:46 +0200)
committerThomas Graf <tgraf@suug.ch>
Thu, 21 Apr 2011 12:46:06 +0000 (14:46 +0200)
Passed the original link to ao_clone() instead of the new one.

lib/route/link.c

index cb92f1914ff93bd5427672ad0693d9f874d69585..0295666edafa36ef5504c5ec3e4ad05c5620aad3 100644 (file)
@@ -216,7 +216,7 @@ static int af_clone(struct rtnl_link *link, struct rtnl_link_af_ops *ops,
        struct rtnl_link *dst = arg;
 
        if (ops->ao_clone &&
-           !(dst->l_af_data[ops->ao_family] = ops->ao_clone(link, data)))
+           !(dst->l_af_data[ops->ao_family] = ops->ao_clone(dst, data)))
                return -NLE_NOMEM;
 
        return 0;