summaryrefslogtreecommitdiff
path: root/lib/route/neigh.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/route/neigh.c')
-rw-r--r--lib/route/neigh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/route/neigh.c b/lib/route/neigh.c
index 9700fbc3..824cf492 100644
--- a/lib/route/neigh.c
+++ b/lib/route/neigh.c
@@ -389,11 +389,13 @@ int rtnl_neigh_parse(struct nlmsghdr *n, struct rtnl_neigh **result)
}
if (tb[NDA_DST]) {
- neigh->n_dst = nl_addr_alloc_attr(tb[NDA_DST], neigh->n_family);
+ neigh->n_dst = nl_addr_alloc_attr(tb[NDA_DST], AF_UNSPEC);
if (!neigh->n_dst) {
err = -NLE_NOMEM;
goto errout;
}
+ nl_addr_set_family(neigh->n_dst,
+ nl_addr_guess_family(neigh->n_dst));
neigh->ce_mask |= NEIGH_ATTR_DST;
}