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:
parent
b5a77cf701
commit
d9b868436a
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue