nexthop: fix error reporting in filter dump

nh_dump_filter is missing a return value check in two cases.
Fix this simply adding an assignment to the proper variable.

Fixes: 63df8e8543 ("Add support for nexthop objects")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Andrea Claudi 2020-03-10 13:15:17 +01:00 committed by Stephen Hemminger
parent b5a77cf701
commit d9b868436a
1 changed files with 2 additions and 2 deletions

View File

@ -59,13 +59,13 @@ static int nh_dump_filter(struct nlmsghdr *nlh, int reqlen)
}
if (filter.groups) {
addattr_l(nlh, reqlen, NHA_GROUPS, NULL, 0);
err = addattr_l(nlh, reqlen, NHA_GROUPS, NULL, 0);
if (err)
return err;
}
if (filter.master) {
addattr32(nlh, reqlen, NHA_MASTER, filter.master);
err = addattr32(nlh, reqlen, NHA_MASTER, filter.master);
if (err)
return err;
}