summaryrefslogtreecommitdiff
path: root/lib/route/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/route/link.c')
-rw-r--r--lib/route/link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/route/link.c b/lib/route/link.c
index c1916e72..df8ea5bb 100644
--- a/lib/route/link.c
+++ b/lib/route/link.c
@@ -333,6 +333,9 @@ static int link_clone(struct nl_object *_dst, struct nl_object *_src)
if ((err = do_foreach_af(src, af_clone, dst)) < 0)
return err;
+ if (src->l_af_ops)
+ dst->l_af_ops = af_lookup_and_alloc(dst, src->l_af_ops->ao_family);
+
if (src->l_phys_port_id)
if (!(dst->l_phys_port_id = nl_data_clone(src->l_phys_port_id)))
return -NLE_NOMEM;