summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #17776 from nabahr/group-rpf-modeDonald Sharp3 days14-117/+497
|\ | | | | PIMD: RPF lookup mode per-group, per-source
| * pimd: Implement rpf lookup mode as a listNathan Bahr8 days10-93/+403
| | | | | | | | | | | | | | | | | | | | Add the support to store lookup modes as a sorted list. List is non-unique and sorts mode with both lists < modes with one list < global mode (no lists). This way, when finding the right mode, we will match a lookup using a prefix list before the global mode. Add passing group address into all lookups (using nht cache and/or synchronous lookup). Many areas don't have a group address, use PIMADDR_ANY if no valid group is needed. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd,yang: Expand rpf-lookup-mode commandNathan Bahr8 days7-29/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add options for group-list and source-list, both of which take a prefix list name. The prefix list is used to determine the lookup mode for specific sources and/or groups. Any number of lookup modes can be configured as long as the combination of group and source list is unique. A global lookup mode (empty group and source lists) is always added and defaults to mrib-then-urib as it currently functions. The global lookup mode can be changed as it current exists with the command `rpf-lookup-mode MODE`. When determinig which mode to use, match source (and group if provided) against the lists, if they are set. If a lookup does not specify a group, then only use lookup modes that do not have a group list defined. A lookup by definition will have a source, so no special handling there. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
* | Merge pull request #17850 from Jafaral/wr-rpgDonald Sharp4 days1-7/+5
|\ \ | | | | | | pimd: always write cand-rp group config even when rp is inactive
| * | pimd: always write cand-rp group config even when rp is inactiveJafar Al-Gharaibeh4 days1-7/+5
| |/ | | | | | | Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* | pimd: explicitly ensure the RP src is BSRJafar Al-Gharaibeh5 days1-1/+1
| | | | | | | | | | | | | | With the recent suppoort of multiple sources of RPs, we can assume non static RPs are BSR RPs. Just make the check explicit for BSR. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* | pimd: fix BSR RPs timing outJafar Al-Gharaibeh5 days1-11/+16
|/ | | | | | | | | On the BSR node itself, RPs shouldn't timeout, becase we know the node is the BSR, and it is active! fixes:#17587 Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* pim: handle return code to fix a couple of coverity issuesJafar Al-Gharaibeh2024-12-192-4/+14
| | | | Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* Merge pull request #17252 from nabahr/mcast-modeRafael Zalamena2024-12-1625-901/+1199
|\ | | | | Fix PIMD RPF lookup mode and nexthop tracking
| * pimd: Clean up pim RPF/NHT show commandsNathan Bahr2024-12-132-69/+89
| | | | | | | | | | | | | | | | | | | | | | | | Moved `show ip rpf A.B.C.D` command here from zebra, deprecated and aliased to `show ip pim nexthop-lookup`. Allow group to be optional in the lookup command. Only validate group if source is ANY. Documented setting source via RP if not provided. Added new output if ANY source + group lookup is performed and no RP is found for the group. Updated output to include souce and group for lookup. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd: Update nexthops when lookup mode changesNathan Bahr2024-12-132-1/+9
| | | | | | | | | | | | | | Link up the RPF lookup mode changing to a force update to RP's and upstreams registered for nexthop lookup cache updates. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd: Refactor pim NHTNathan Bahr2024-12-1320-824/+931
| | | | | | | | | | | | | | | | Refactor the next hop tracking in PIM to fully support the configured RPF lookup mode. Moved many NHT related functions to pim_nht.h/c NHT now tracks both MRIB and URIB tables and makes nexthop decisions based on the configured lookup mode. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd: Refactor synchronous nexthop lookupNathan Bahr2024-12-132-6/+91
| | | | | | | | | | | | | | | | Add prefix length in nexthop response. Apply lookup mode to the sychronous lookups, where we may lookup the MRIB, URIB, or both and make a decision based on the nexthop. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd,yang: Reimplement RPF lookup vty in router pimNathan Bahr2024-12-137-2/+79
| | | | | | | | | | | | | | Add rpf-lookup-mode MODE vty command under router pim block. Including NB piping and config write. Using the mode still pending. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * zebra,pimd,lib: Modify ZEBRA_NEXTHOP_LOOKUP_MRIBNathan Bahr2024-12-121-2/+3
| | | | | | | | | | | | | | | | | | Modified ZEBRA_NEXTHOP_LOOKUP_MRIB to include the SAFI from which to do the lookup. This generalizes the API away from MRIB specifically and allows the user to decide how it should do lookups. Rename ZEBRA_NEXTHOP_LOOKUP_MRIB to ZEBRA_NEXTHOP_LOOKUP now that it is more generalized. This change is in preperation to remove multicast lookup mode completely from zebra. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
* | Merge pull request #17642 from opensourcerouting/pim-csJafar Al-Gharaibeh2024-12-135-49/+24
|\ \ | | | | | | pimd,pim6d: optimize multicast prefix generation and fix coverity scan defect
| * | pimd,pim6d: optimize multicast prefix generationRafael Zalamena2024-12-135-49/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Coverity Scan CID 1602463: make it impossible for the function to fail. Hardcode the multicast prefix generation instead of calling `str2prefix()` which caused unnecessary memory allocations and returned error values. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | Merge pull request #17635 from opensourcerouting/pim6-embedded-crashJafar Al-Gharaibeh2024-12-132-7/+2
|\ \ \ | |/ / |/| | pim6d: fix crash on clear ipv6 mroute
| * | pim6d: fix crash on clear ipv6 mrouteRafael Zalamena2024-12-112-7/+2
| | | | | | | | | | | | | | | | | | Fix crash on `clear ipv6 mroute` when using embedded RP. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | pimd: support originator id configurationRafael Zalamena2024-12-127-20/+114
| |/ |/| | | | | | | | | Allow user to specify the RP field for the SA messages. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | Merge pull request #17636 from opensourcerouting/msdp-cleanupDonald Sharp2024-12-1210-115/+105
|\ \ | | | | | | pimd: clean up MSDP code
| * | pimd: move all MSDP code to its own placeRafael Zalamena2024-12-118-75/+54
| | | | | | | | | | | | | | | | | | | | | Guard MSDP code to compile only on IPv4 and remove all MSDP code from PIMv6. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | pimd: move MSDP configuration and initializationRafael Zalamena2024-12-113-19/+18
| | | | | | | | | | | | | | | | | | | | | Reorganize the MSDP initialization code and configuration writing code to its appropriated place. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | pim6d: ignore more MSDP callbacksRafael Zalamena2024-12-111-21/+33
| |/ | | | | | | | | | | | | PIMv6 does not implement MSDP, users should use PIMv6 embedded RP instead. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | Merge pull request #17605 from donaldsharp/upstream_some_evpnDonatas Abraitis2024-12-111-1/+0
|\ \ | |/ |/| Upstream some internal code
| * pimd: skip init of mlag roles based on the zebra capabilities messageAnuradha Karuppiah2024-12-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like the cap setting was added for testing mlag via zebra test cli to config the mlag role. However it is interfering with the valid state updates rxed from the MLAG daemon based on timing (in some cases the MLAG state changes are rxed before the capabilities). Reference logs - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> root@TORC11:mgmt:/home/cumulus# grep -ri "my_role\|MlagRole" /var/log/frr/bgpd.log 2021/06/18 13:26:40.380130 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: SECONDARY, peer_state: DOWN 2021/06/18 13:26:40.380766 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: SECONDARY, peer_state: DOWN 2021/06/18 13:26:41.382258 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: SECONDARY, peer_state: RUNNING 2021/06/18 13:26:41.382379 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: PRIMARY, peer_state: RUNNING 2021/06/18 13:26:52.386071 ZEBRA: Sending capabilities to client pim: MPLS enabled numMultipath 128 GR disabled MaintMode off MlagRole 0 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Ticket: #2691629 Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
* | Merge pull request #17521 from opensourcerouting/msdp-sa-limitJafar Al-Gharaibeh2024-12-106-0/+90
|\ \ | |/ |/| pimd: MSDP per peer SA limit
| * pimd: implement MSDP peer SA limitingRafael Zalamena2024-12-054-2/+41
| | | | | | | | | | | | Implement a command to enable/disable per peer MSDP SA limiting. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * yang,pimd: support shutdown and SA limitRafael Zalamena2024-12-053-0/+51
| | | | | | | | | | | | | | | | Add MSDP shutdown and SA limiting configuration to YANG model. (no implementation, just boiler plate code) Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | pimd: Convert boundary_oil_plist to struct prefix_listCorey Siltala2024-12-066-21/+21
| | | | | | | | | | | | Rather than storing the prefix-list name and looking it up every time we use it, store a pointer to the prefix-list itself. Signed-off-by: Corey Siltala <csiltala@atcorp.com>
* | pimd,yang: Extend multicast boundary functionalityCorey Siltala2024-12-0614-32/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new interface command ip multicast boundary ACCESSLIST4_NAME. This allows filtering on both source and group using the extended access-list syntax vs. group-only as with the existing "ip multicast boundary oil" command, which uses prefix-lists. If both are configured, the prefix- list is evaluated first. The default behavior for both prefix-lists and access-lists remains "deny", so the prefix-list must have a terminating "permit" statement in order to also evaluate against the access-list. The following example denies groups in range 229.1.1.0/24 and groups in range 232.1.1.0/24 with source 10.0.20.2: ! ip prefix-list pim-oil-plist seq 10 deny 229.1.1.0/24 ip prefix-list pim-oil-plist seq 20 permit any ! access-list pim-acl seq 10 deny ip host 10.0.20.2 232.1.1.0 0.0.0.255 access-list pim-acl seq 20 permit ip any any ! interface r1-eth0 ip address 10.0.20.1/24 ip igmp ip pim ip multicast boundary oil pim-oil-plist ip multicast boundary pim-acl ! Signed-off-by: Corey Siltala <csiltala@atcorp.com>
* | pimd: Move ACL handling to pim_util.cCorey Siltala2024-12-063-49/+46
| | | | | | | | | | | | | | Move the extended access-list handling from pim_msdp_packet.c to pim_util.c to allow use elsewhere in the daemon. Signed-off-by: Corey Siltala <csiltala@atcorp.com>
* | Merge pull request #17570 from btrent98/igmp-proxy-memfixDonald Sharp2024-12-051-2/+1
|\ \ | |/ |/| pimd: free igmp proxy joins on interface deletion
| * pimd: free igmp proxy joins on interface deletionBarry A. Trent2024-12-041-2/+1
| | | | | | | | Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
* | Merge pull request #17502 from opensourcerouting/msdp-shutdownJafar Al-Gharaibeh2024-12-056-0/+118
|\ \ | | | | | | pimd: implement MSDP shutdown command
| * | pimd: implement MSDP shutdown commandRafael Zalamena2024-11-256-0/+118
| | | | | | | | | | | | | | | | | | Allow MSDP protocol to be disabled. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | Merge pull request #17578 from donaldsharp/pim_autorp_prevent_crashJafar Al-Gharaibeh2024-12-041-2/+4
|\ \ \ | |_|/ |/| | pimd: Prevent crash of pim when auto-rp's socket is not initialized
| * | pimd: Prevent crash of pim when auto-rp's socket is not initializedDonald Sharp2024-12-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the socket associated with the auto-rp fails to initialize then the memory for the auto-rp is just dropped on the floor. Additionally any type of attempt at using the feature will just cause pimd to crash, when the pointer is derefed. Since it is derefed all over the place without checking. Clearly if you cannot bind/use the socket let's allow continuation. Fixes: #17540 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | Merge pull request #17569 from btrent98/igmp-proxy-bugfixDonald Sharp2024-12-041-0/+6
|\ \ \ | |/ / |/| | pimd: igmp proxy joins should not be written as part of config
| * | pimd: igmp proxy joins should not be written as part of configBarry A. Trent2024-12-031-0/+6
| |/ | | | | | | Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
* / pimd: Fix access-list memory leak in pimdCorey Siltala2024-11-261-0/+2
|/ | | | | | Reset access-lists in pimd on terminate Signed-off-by: Corey Siltala <csiltala@atcorp.com>
* Merge pull request #17340 from nabahr/mapping-agentRafael Zalamena2024-11-2111-639/+1736
|\ | | | | PIMD: Implement AutoRP mapping-agent
| * pimd: Implement autorp mapping agentNathan Bahr2024-11-193-420/+1218
| | | | | | | | | | | | | | | | | | Fully flushed out the AutoRP implementation now with the AutoRP mapping agent. This touched most of AutoRP in order to have common reuse of containers for each section of AutoRP operation (Candidate RP announcement, Mapping agent, Discovery). Many debugs had guards added and many more debug logs added. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd: Implement autorp mapping agent CLINathan Bahr2024-11-195-175/+149
| | | | | | | | | | | | Also exposes BSR cand_addrsel methods for use in AutoRP. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
| * pimd,yang: Add PIMD northbound/yang for AutoRP mapping agentNathan Bahr2024-11-193-44/+369
| | | | | | | | | | | | Reuses the candidate selection logic from BSR configuration Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
* | pimd,yang: log MSDP SA eventsRafael Zalamena2024-11-218-62/+107
| | | | | | | | | | | | Add new command to log all SA events. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | pimd,yang: log MSDP neighbor eventsRafael Zalamena2024-11-218-62/+110
| | | | | | | | | | | | Move MSDP neighbor events global debug to per PIM instance. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | pimd: constify peer lookup functionRafael Zalamena2024-11-202-4/+2
| | | | | | | | | | | | Make parameter `const` to document that the variable will not change. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | pimd: remove temporary variables from MSDP peerRafael Zalamena2024-11-203-23/+21
|/ | | | | | | Remove from MSDP peer data structure two temporary variables that should only be used when calling library functions. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* pim6d: fix coverity scan warningRafael Zalamena2024-11-181-2/+6
| | | | | | | Fix Coverity Scan CID 1601875: use the return value to tell user about the availability of a next hop to the learned RP (needs debug enabled). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>