Skip to content

pimd: regiface added to ssm group mroute#20303

Merged
Jafaral merged 3 commits intoFRRouting:masterfrom
soumyar-roy:soumya/pim_fixes
Feb 3, 2026
Merged

pimd: regiface added to ssm group mroute#20303
Jafaral merged 3 commits intoFRRouting:masterfrom
soumyar-roy:soumya/pim_fixes

Conversation

@soumyar-roy
Copy link
Contributor

@soumyar-roy soumyar-roy commented Dec 18, 2025

When the upstream for(s,g) transition from join to no-join, we always add pimreg interface to mroute on FHR.
Fix: Add pimreg interface only for non ssm group.

Ticket: #3821643
Testing:
before:
tor-21# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
R - SGRpt Pruned, F - Register flag, T - SPT-bit set
Source Group Flags Proto Input Output TTL Uptime
20.20.30.1 232.2.3.5 SF PIM swp3 pimreg 1 00:02:57
PIM swp2 1

after:
tor-21# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
R - SGRpt Pruned, F - Register flag, T - SPT-bit set
Source Group Flags Proto Input Output TTL Uptime
20.20.30.1 232.2.3.5 SF PIM swp3 swp2 1 00:01:43

Test log from upstream frr run>>

= PAUSING: before :Restart multicast traffic to trigger fresh state transition ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:35:56,077 INFO: topo: STEP 1: 'Restart multicast traffic to trigger fresh state transition'

== PAUSING: before :Wait for upstream to transition to NOT_JOINED state ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:35:56,626 INFO: topo: STEP 2: 'Wait for upstream to transition to NOT_JOINED state'

== PAUSING: before :Check if pimreg was incorrectly added to Dense mode group OIL ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:36:20,192 INFO: topo: STEP 3: 'Check if pimreg was incorrectly added to Dense mode group OIL'
2026-01-22 23:36:20,202 INFO: topo: R1 upstream state:
Iif Source Group State Uptime JoinTimer RSTimer KATimer RefCnt
Unknown * 224.0.1.39 NotJ 00:01:22 --:--:-- --:--:-- --:--:-- 3
Unknown * 224.0.1.40 NotJ 00:01:22 --:--:-- --:--:-- --:--:-- 3
r1-eth1 10.100.0.2 239.1.1.1 NotJ 00:00:00 --:--:-- --:--:-- 00:03:29 3

2026-01-22 23:36:20,211 INFO: topo: Dense group 239.1.1.1 OIL: ['pimreg']
2026-01-22 23:36:20,219 INFO: topo: *** BUG DETECTED: pimreg in OIL for Dense mode group! ***
2026-01-22 23:36:20,219 INFO: topo: PROOF (BUG - pimreg in Output):
IP Multicast Routing Table
Flags: S - Sparse, D - Dense, C - Connected, P - Pruned
R - SGRpt Pruned, F - Register flag, T - SPT-bit set
Source Group Flags Proto Input Output TTL Uptime
10.100.0.2 239.1.1.1 FDP PIM r1-eth1 pimreg 1 00:01:17 <<<<<<Fail case

== PAUSING: before :Verify pimreg is NOT in OIL for Dense mode group 239.1.1.1 ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:36:22,561 INFO: topo: STEP 4: 'Verify pimreg is NOT in OIL for Dense mode group 239.1.1.1'
2026-01-22 23:36:53,264 ERROR: topo: 'verify_mroute_pimreg_absent' failed after 30.70 seconds
2026-01-22 23:36:53,268 ERROR: topo: test failed at "test_pim_dense/test_pim_verify_pimreg_not_in_ssm_dense": Dense mode test failed: pimreg incorrectly present in OIL for Dense group 239.1.1.1, OIL: ['pimreg']

with fix>>

== PAUSING: before :Restart multicast traffic to trigger fresh state transition ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:40:26,304 INFO: topo: STEP 1: 'Restart multicast traffic to trigger fresh state transition'

== PAUSING: before :Wait for upstream to transition to NOT_JOINED state ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:40:26,748 INFO: topo: STEP 2: 'Wait for upstream to transition to NOT_JOINED state'

== PAUSING: before :Check if pimreg was incorrectly added to Dense mode group OIL ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:40:53,589 INFO: topo: STEP 3: 'Check if pimreg was incorrectly added to Dense mode group OIL'
2026-01-22 23:40:53,605 INFO: topo: R1 upstream state:
Iif Source Group State Uptime JoinTimer RSTimer KATimer RefCnt
Unknown * 224.0.1.39 NotJ 00:01:21 --:--:-- --:--:-- --:--:-- 3
Unknown * 224.0.1.40 NotJ 00:01:21 --:--:-- --:--:-- --:--:-- 3
r1-eth1 10.100.0.2 239.1.1.1 NotJ 00:00:00 --:--:-- --:--:-- 00:03:29 3

2026-01-22 23:40:53,615 INFO: topo: Dense group 239.1.1.1 OIL: []
2026-01-22 23:40:53,624 INFO: topo: *** OK: pimreg correctly excluded ***
2026-01-22 23:40:53,625 INFO: topo: PROOF (FIXED - no pimreg):
IP Multicast Routing Table
Flags: S - Sparse, D - Dense, C - Connected, P - Pruned
R - SGRpt Pruned, F - Register flag, T - SPT-bit set
Source Group Flags Proto Input Output TTL Uptime
10.100.0.2 239.1.1.1 FDP none r1-eth1 none 0 --:--:--

== PAUSING: before :Verify pimreg is NOT in OIL for Dense mode group 239.1.1.1 ==
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
2026-01-22 23:41:07,301 INFO: topo: STEP 4: 'Verify pimreg is NOT in OIL for Dense mode group 239.1.1.1'
PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:
PASSEDPAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:

test_pim_dense.py::test_memory_leak PAUSED, "cli" for CLI, "pdb" to debug, "Enter" to continue:

@Jafaral
Copy link
Member

Jafaral commented Jan 19, 2026

The output above is not from the master branch, I don't see dense mode as an option in the output. Can you please test this fix in a newer version of FRR and check if we also need to do the same for dense mode?

@frrbot frrbot bot added the tests Topotests, make check, etc label Jan 22, 2026
@github-actions github-actions bot added size/M and removed size/XS labels Jan 22, 2026
@github-actions github-actions bot added size/L and removed size/M labels Jan 22, 2026
@github-actions github-actions bot added size/M and removed size/L labels Jan 22, 2026
When the upstream for(s,g) transition from join to no-join, we
always add pimreg interface to mroute on FHR.
Fix: Add pimreg interface only for non ssm group.

Ticket: #3821643
Testing:
before:
tor-21# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit set
 Source      Group      Flags  Proto  Input  Output  TTL  Uptime
 20.20.30.1  232.2.3.5  SF     PIM    swp3   pimreg  1    00:02:57
                               PIM           swp2    1

after:
tor-21# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit set
 Source      Group      Flags  Proto  Input  Output  TTL  Uptime
 20.20.30.1  232.2.3.5  SF     PIM    swp3   swp2    1    00:01:43

Signed-off-by: Vijayalaxmi Basavaraj <vbasavaraj@nvidia.com>
@soumyar-roy
Copy link
Contributor Author

The output above is not from the master branch, I don't see dense mode as an option in the output. Can you please test this fix in a newer version of FRR and check if we also need to do the same for dense mode?

Addressed, added test log

Add test to verify pimreg interface is not added to SSM (232.0.0.0/8)
and Dense mode groups.

Signed-off-by: Soumya Roy <souroy@nvidia.com>
When upstream state transitions to NOT_JOINED on FHR, pimreg interface
should only be added for ASM (Any Source Multicast) groups. The existing
code already excludes SSM groups (232.0.0.0/8), but Dense mode groups
also need to be excluded as they don't use the PIM Register mechanism.

Add check for PIM_UPSTREAM_DM_TEST_INTERFACE flag to skip Dense mode
groups, ensuring pimreg is only added for ASM groups that require the
Register mechanism to communicate with the Rendezvous Point.

Signed-off-by: Soumya Roy <souroy@nvidia.com>
@Jafaral
Copy link
Member

Jafaral commented Jan 23, 2026

@Mergifyio backport stable/10.5 stable/10.4

@mergify
Copy link

mergify bot commented Jan 23, 2026

backport stable/10.5 stable/10.4

✅ Backports have been created

Details

@Jafaral Jafaral merged commit 0937fb0 into FRRouting:master Feb 3, 2026
18 checks passed
donaldsharp added a commit that referenced this pull request Feb 3, 2026
pimd: regiface added to ssm group mroute (backport #20303)
donaldsharp added a commit that referenced this pull request Feb 3, 2026
pimd: regiface added to ssm group mroute (backport #20303)
@mattiaswal mattiaswal mentioned this pull request Mar 18, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants