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] [day] [month] [year] [list]
Message-ID: <20250731215920.3675217-2-william@wkennington.com>
Date: Thu, 31 Jul 2025 14:59:20 -0700
From: "William A. Kennington III" <william@...nnington.com>
To: netdev@...r.kernel.org
Cc: "William A. Kennington III" <william@...nnington.com>
Subject: [PATCH iproute2-next 2/2] ip-monitor: Always monitor links

We need to watch link changes even if we don't actively print them.
Otherwise, route changes will not print the correct link name.

Signed-off-by: William A. Kennington III <william@...nnington.com>
---
 ip/ipmonitor.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c
index 1f4e860f..14aba1f1 100644
--- a/ip/ipmonitor.c
+++ b/ip/ipmonitor.c
@@ -25,6 +25,7 @@ static int prefix_banner;
 int listen_all_nsid;
 struct rtnl_ctrl_data *ctrl_data;
 int do_monitor;
+int print_link;
 
 static void usage(void)
 {
@@ -100,7 +101,8 @@ static int accept_msg(struct rtnl_ctrl_data *ctrl,
 	case RTM_NEWLINK:
 	case RTM_DELLINK:
 		ll_remember_index(n, NULL);
-		print_linkinfo(n, arg);
+		if (print_link)
+			print_linkinfo(n, arg);
 		return 0;
 
 	case RTM_NEWADDR:
@@ -263,8 +265,10 @@ int do_ipmonitor(int argc, char **argv)
 	if (!lmask)
 		lmask = IPMON_L_ALL;
 
+	/* Always monitor links for renaming */
+	groups |= nl_mgrp(RTNLGRP_LINK);
 	if (lmask & IPMON_LLINK)
-		groups |= nl_mgrp(RTNLGRP_LINK);
+		print_link = true;
 	if (lmask & IPMON_LADDR) {
 		if (!preferred_family || preferred_family == AF_INET)
 			groups |= nl_mgrp(RTNLGRP_IPV4_IFADDR);
-- 
2.50.1.565.gc32cd1483b-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ