diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2021-02-25 15:06:23 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2021-04-09 18:29:58 +0200 |
commit | df948efc56d9db4d80dfc7aea6a8fe350fdea4bd (patch) | |
tree | 7718990aac569a48cbe92f632ba71e6ba0ca30ee /zebra | |
parent | lib: add api to configure neighbor table per interface (diff) | |
download | frr-df948efc56d9db4d80dfc7aea6a8fe350fdea4bd.tar.xz frr-df948efc56d9db4d80dfc7aea6a8fe350fdea4bd.zip |
zebra: fixes NDA_DST in netlink_neigh_update() function
When netlink_neigh_update() is called, the link registration was
failing, due to bad request length.
Also, the query was failing if NDA_DST was an ipv6 address.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/rt_netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index be9c91367..90d809475 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1570,7 +1570,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla, nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol, sizeof(protocol)); req.ndm.ndm_type = RTN_UNICAST; - nl_attr_put32(&req.n, family2addrsize(family), NDA_DST, addr); + nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, + family2addrsize(family)); if (lla) nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen); |