lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Mar 2020 13:15:17 +0100
From:   Andrea Claudi <aclaudi@...hat.com>
To:     netdev@...r.kernel.org
Cc:     stephen@...workplumber.org, dsahern@...il.com
Subject: [PATCH iproute2] 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@...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;
 	}
-- 
2.24.1

Powered by blists - more mailing lists