]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip/ipmroute: use preferred_family to get prefix
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 9 Oct 2024 09:53:09 +0000 (09:53 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 10 Oct 2024 16:52:49 +0000 (09:52 -0700)
commitf305296e40c5a5b40d5af6f47f3f0e669e52e604
tree18fea8d990c9530e631446ff3e0dd6723bae77d4
parent95f4021b4865a934a99f692b75ffa6d16fae241b
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@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipmroute.c