All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] nexthop: fix error reporting in filter dump
@ 2020-03-10 12:15 Andrea Claudi
  2020-03-10 17:43 ` David Ahern
  2020-03-15 16:56 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Andrea Claudi @ 2020-03-10 12:15 UTC (permalink / raw)
  To: netdev; +Cc: stephen, dsahern

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>
---
 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;
 	}
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2] nexthop: fix error reporting in filter dump
  2020-03-10 12:15 [PATCH iproute2] nexthop: fix error reporting in filter dump Andrea Claudi
@ 2020-03-10 17:43 ` David Ahern
  2020-03-15 16:56 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2020-03-10 17:43 UTC (permalink / raw)
  To: Andrea Claudi, netdev; +Cc: stephen

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@redhat.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@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2] nexthop: fix error reporting in filter dump
  2020-03-10 12:15 [PATCH iproute2] nexthop: fix error reporting in filter dump Andrea Claudi
  2020-03-10 17:43 ` David Ahern
@ 2020-03-15 16:56 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2020-03-15 16:56 UTC (permalink / raw)
  To: Andrea Claudi; +Cc: netdev, dsahern

On Tue, 10 Mar 2020 13:15:17 +0100
Andrea Claudi <aclaudi@redhat.com> 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@redhat.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-15 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 12:15 [PATCH iproute2] nexthop: fix error reporting in filter dump Andrea Claudi
2020-03-10 17:43 ` David Ahern
2020-03-15 16:56 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.