[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1865ee5b-2339-da2a-7c33-7cf3cac98213@gmail.com>
Date: Tue, 10 Mar 2020 11:43:06 -0600
From: David Ahern <dsahern@...il.com>
To: Andrea Claudi <aclaudi@...hat.com>, netdev@...r.kernel.org
Cc: stephen@...workplumber.org
Subject: Re: [PATCH iproute2] nexthop: fix error reporting in filter dump
On 3/10/20 6:15 AM, Andrea Claudi wrote:
> 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@...hat.com>
> ---
> ip/ipnexthop.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ip/ipnexthop.c b/ip/ipnexthop.c
> index 9f860c8cea251..99f89630ed189 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;
> }
>
Reviewed-by: David Ahern <dsahern@...il.com>
Powered by blists - more mailing lists