ip/ipmroute: use preferred_family to get prefix
Subsystems (2)
PATCH 1/1 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.
--- ip/ipmroute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ip/ipmroute.c +2 -2
@@ -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++;
Signature · 1 line
2.46.0
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Hello:
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Quoted 10 lines · On Wed, 9 Oct 2024 09:53:09 +0000 you wrote:
The mroute family is reset to
RTNL_FAMILY_IPMRorRTNL_FAMILY_IP6MRwhen retrieving the multicast routing cache. However, theget_prefix()and subsequently__get_addr_1()cannot identify these families. Usingpreferred_familyto obtain the prefix can resolve this issue.Fixes 98ce99273f24 ("mroute: fix up family handling")Reported-by Jianlin Shi <[email protected]>Signed-off-by Hangbin Liu <[email protected]>[...]
Here is the summary with links:
- [iproute2] ip/ipmroute: use preferred_family to get prefix
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=f305296e40c5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html