pimd: regiface added to ssm group mroute (backport #20303)#20669
Merged
donaldsharp merged 3 commits intostable/10.5from Feb 3, 2026
Merged
pimd: regiface added to ssm group mroute (backport #20303)#20669donaldsharp merged 3 commits intostable/10.5from
donaldsharp merged 3 commits intostable/10.5from
Conversation
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>
(cherry picked from commit d81ccfb)
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> (cherry picked from commit f9c88ce)
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> (cherry picked from commit 8c3aee4)
|
Target branch is not in the allowed branches list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
This is an automatic backport of pull request #20303 done by [Mergify](https://mergify.com).