Skip to content

pimd, pim6d: route-map filtering for source/group #18955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 5, 2025

Conversation

rzalamena
Copy link
Member

@rzalamena rzalamena commented Jun 4, 2025

Implement route-map support for PIM / PIMv6 to allow users to filter IGMP / MLD joins using source / group / interface combinations.

@rzalamena rzalamena force-pushed the pim-rmap branch 2 times, most recently from cb14c3c to 6cfd913 Compare June 13, 2025 16:26
@frrbot frrbot bot added the tests Topotests, make check, etc label Jun 13, 2025
@rzalamena rzalamena force-pushed the pim-rmap branch 8 times, most recently from 9fed961 to f0f3dda Compare June 17, 2025 19:55
@frrbot frrbot bot added the documentation label Jun 17, 2025
@rzalamena rzalamena marked this pull request as ready for review June 17, 2025 20:20
Copy link

@csiltala csiltala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me beyond the topotest failure, looks like there may be a couple places the previous multicast boundary wasn't being checked but should have been but that's a separate issue from the route-map functionality in this PR.

@Jafaral
Copy link
Member

Jafaral commented Jul 2, 2025

@rzalamena , one minor nit from frrbot, otherwise this is good to go.

--- a/pimd/pim6_mld.c
+++ b/pimd/pim6_mld.c
@@ -268,7 +268,8 @@ static bool gm_sg_limit_reached(struct gm_if *gm_if, const pim_addr source, cons
 	return false;
 }
 
-static bool gm_sg_filter_match(const struct gm_if *gm_if, const pim_addr source, const pim_addr group)
+static bool gm_sg_filter_match(const struct gm_if *gm_if, const pim_addr source,
+			       const pim_addr group)
 {

rzalamena added 5 commits July 2, 2025 09:59
Change the `struct in_addr` field to a `struct ipaddr` so we can also
support prefix_sg with IPv6 groups.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
New YANG model for PIM route map support: support filtering on multicast
group, multicast source or multicast interface.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Add the code needed to display the route map new leaves.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Allow the PIM6d daemon to receive commands that manipulate route-map
and prefix list.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Code to implement the commands and route maps callbacks.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
rzalamena added 4 commits July 2, 2025 14:30
New interface configuration to filter IGMP joins based on source / group.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
New interface configuration to filter MLD joins based on source / group.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Implement tests for the new multicast route-map filtering.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
@rzalamena
Copy link
Member Author

Update: the new topotest is failing on i386 consistently due to python magic in mcast-tester.py. I'm trying to figure out why it is not possible to do source specific join.

  File "/root/share/topotests/lib/mcast-tester.py", line 182, in <module>
    multicast_join(msock, ifindex, args.group, args.port, args.source)
  File "/root/share/topotests/lib/mcast-tester.py", line 114, in multicast_join
    sock.setsockopt(ip_proto, opt, mreq)
OSError: [Errno 99] Cannot assign requested address

The group_source_req structure in 32bit has different fields/sizes so we
must account that. Check if running 32bit then use the 32bit version of
the packed structure.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
@frrbot frrbot bot added the bugfix label Jul 4, 2025
@rzalamena
Copy link
Member Author

I fixed the multicast tester issue and now the test is passing on i386.

@Jafaral
Copy link
Member

Jafaral commented Jul 5, 2025

I fixed the multicast tester issue and now the test is passing on i386.

Thanks @rzalamena . I will merge this PR, but do we need to backport the fix to 10.4?

@Jafaral Jafaral merged commit 6f975a3 into FRRouting:master Jul 5, 2025
16 checks passed
@rzalamena rzalamena deleted the pim-rmap branch July 5, 2025 14:01
@rzalamena
Copy link
Member Author

I fixed the multicast tester issue and now the test is passing on i386.

Thanks @rzalamena . I will merge this PR, but do we need to backport the fix to 10.4?

No, this fix is for this new test using IPv6 MLD SG join. Previously nobody else was doing IPv6 MLD join with source and group using mcast-tester.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants