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>] [day] [month] [year] [list]
Message-ID: <20241009095309.17167-1-liuhangbin@gmail.com>
Date: Wed,  9 Oct 2024 09:53:09 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>,
	David Ahern <dsahern@...nel.org>,
	Hangbin Liu <liuhangbin@...il.com>,
	Jianlin Shi <jishi@...hat.com>
Subject: [PATCH iproute2] ip/ipmroute: use preferred_family to get prefix

The mroute family is reset to RTNL_FAMILY_IPMR or RTNL_FAMILY_IP6MR when
retrieving the multicast routing cache. However, the get_prefix() and
subsequently __get_addr_1() cannot identify these families. Using
preferred_family to obtain the prefix can resolve this issue.

Fixes: 98ce99273f24 ("mroute: fix up family handling")
Reported-by: Jianlin Shi <jishi@...hat.com>
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
 ip/ipmroute.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ip/ipmroute.c b/ip/ipmroute.c
index da58d2953049..c540eab133a4 100644
--- a/ip/ipmroute.c
+++ b/ip/ipmroute.c
@@ -271,7 +271,7 @@ static int mroute_list(int argc, char **argv)
 			id = *argv;
 		} else if (matches(*argv, "from") == 0) {
 			NEXT_ARG();
-			if (get_prefix(&filter.msrc, *argv, family))
+			if (get_prefix(&filter.msrc, *argv, preferred_family))
 				invarg("from value is invalid\n", *argv);
 		} else {
 			if (strcmp(*argv, "to") == 0) {
@@ -279,7 +279,7 @@ static int mroute_list(int argc, char **argv)
 			}
 			if (matches(*argv, "help") == 0)
 				usage();
-			if (get_prefix(&filter.mdst, *argv, family))
+			if (get_prefix(&filter.mdst, *argv, preferred_family))
 				invarg("to value is invalid\n", *argv);
 		}
 		argc--; argv++;
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ