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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu,  8 Feb 2024 09:26:28 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCH iproute2 2/3] ip: detect errors in netconf monitor mode

If rtnl_listen() returns error while looking for netconf events,
then exit with status of 2 as other iproute2 monitor actions do.

Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
 ip/ipnetconf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ip/ipnetconf.c b/ip/ipnetconf.c
index 9ae6c45e7fd1..a0c7e051bac5 100644
--- a/ip/ipnetconf.c
+++ b/ip/ipnetconf.c
@@ -193,7 +193,8 @@ static int do_show(int argc, char **argv)
 			perror("Can not send request");
 			exit(1);
 		}
-		rtnl_listen(&rth, print_netconf, stdout);
+		if (rtnl_listen(&rth, print_netconf, stdout) < 0)
+			exit(2);
 	} else {
 		rth.flags = RTNL_HANDLE_F_SUPPRESS_NLERR;
 dump:
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ