pimd: send AutoRP discovery on all PIM interfaces - #22865
Open
enkechen-panw wants to merge 2 commits into
Open
Conversation
enkechen-panw
force-pushed
the
fix-autorp-discovery-multicast
branch
from
July 29, 2026 17:17
bdbfedc to
52e63fc
Compare
Contributor
Author
|
ci:rerun |
Member
|
@greptileai review |
Greptile SummaryUpdates AutoRP discovery distribution and coverage:
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant MA as Mapping Agent
participant K as Kernel/IP_PKTINFO
participant PI as PIM Interfaces
participant R as Connected Routers
MA->>MA: Build discovery packet
loop Each eligible PIM interface
MA->>K: sendmsg(packet, ifindex, configured source)
K->>PI: Transmit on selected interface
PI->>R: Deliver AutoRP discovery
end
R->>R: Elect highest-address mapping agent
Reviews (2): Last reviewed commit: "tests: add AutoRP mapping agent election..." | Re-trigger Greptile |
The AutoRP mapping agent was only sending discovery messages from the single configured source interface. In topologies where routers are on different L2 segments (not directly connected to the mapping agent's source interface), they would not reliably receive discovery messages. This caused flaky failures in the pim_autorp topotest, particularly test_pim_autorp_discovery_neg_prefixes, where r4 (two hops from the mapping agent) would intermittently fail to receive discovery. For systems with IP_PKTINFO, fix by sending discovery on all PIM interfaces, similar to how announcements are already sent. Use sendmsg() with IP_PKTINFO to specify both the outgoing interface and a consistent source address (the configured mapping agent address). This ensures: 1. All directly connected routers receive discovery regardless of which interface they're on 2. The source IP is consistent across all interfaces, ensuring proper mapping agent election when multiple mapping agents exist Systems without IP_PKTINFO fall back to the original single-interface behavior. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
Add test to verify that when multiple mapping agents are present, the one with the higher IP address wins the election. This ensures routers correctly suppress their own mapping agent when they receive discovery packets from a higher IP address. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
enkechen-panw
force-pushed
the
fix-autorp-discovery-multicast
branch
from
July 30, 2026 07:23
52e63fc to
31a80b7
Compare
Contributor
Author
|
@greptileai review |
Contributor
Author
|
ci:rerun |
Member
|
Can you help me understand why packets are not reliably being received? It's not clear to me from the description As a note, as I read this change this code sends packets on any interface that there is a pim data structure sunk off of it, shouldn't it only send packets on the |
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.
The AutoRP mapping agent was only sending discovery messages from the
single configured source interface. In topologies where routers are on
different L2 segments (not directly connected to the mapping agent's
source interface), they would not reliably receive discovery messages.
This caused flaky failures in the pim_autorp topotest, particularly
test_pim_autorp_discovery_neg_prefixes, where r4 (two hops from the
mapping agent) would intermittently fail to receive discovery.
For systems with IP_PKTINFO, fix by sending discovery on all PIM
interfaces, similar to how announcements are already sent. Use
sendmsg() with IP_PKTINFO to specify both the outgoing interface
and a consistent source address (the configured mapping agent
address). This ensures:
which interface they're on
proper mapping agent election when multiple mapping agents exist
Systems without IP_PKTINFO fall back to the original single-interface
behavior.