diff options
author | Andrea Claudi <aclaudi@redhat.com> | 2020-03-10 13:15:17 +0100 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2020-03-15 09:54:42 -0700 |
commit | d9b868436a6fce8986560178c6d1a78072e21861 (patch) | |
tree | 6fe2040e1029354062f90701149a90b0ddd2755c | |
parent | b5a77cf70116f4c5c1767f0e0ab78f7ff2f58bca (diff) | |
download | iproute2-d9b868436a6fce8986560178c6d1a78072e21861.tar.gz |
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: 63df8e8543b03 ("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>
-rw-r--r-- | ip/ipnexthop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ip/ipnexthop.c b/ip/ipnexthop.c index 9f860c8ce..99f89630e 100644 --- a/ip/ipnexthop.c +++ b/ip/ipnexthop.c @@ -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; } |