summaryrefslogtreecommitdiff
path: root/pimd/pim_bsm.c
AgeCommit message (Collapse)Author
2025-01-14Merge pull request #17850 from Jafaral/wr-rpgDonald Sharp
pimd: always write cand-rp group config even when rp is inactive
2025-01-13pimd: always write cand-rp group config even when rp is inactiveJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-13pimd: explicitly ensure the RP src is BSRJafar Al-Gharaibeh
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>
2025-01-13pimd: fix BSR RPs timing outJafar Al-Gharaibeh
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>
2024-12-16Merge pull request #17252 from nabahr/mcast-modeRafael Zalamena
Fix PIMD RPF lookup mode and nexthop tracking
2024-12-13pimd: Refactor pim NHTNathan Bahr
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>
2024-12-13pimd,pim6d: optimize multicast prefix generationRafael Zalamena
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>
2024-11-19pimd: Implement autorp mapping agent CLINathan Bahr
Also exposes BSR cand_addrsel methods for use in AutoRP. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-25pimd: allow a bsr with higher priority to take overJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09pimd: refactor pim_sock_read to be used with unicast bsr msgsJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09pimd: Candidate-BSR supportJafar Al-Gharaibeh
Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09pimd: Candidate-RP supportJafar Al-Gharaibeh
Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-06-20pimd: prepare NHT for tracking BSM C-RPsDavid Lamparter
For BSMs, we should track which of the RP candidates in the BSM message are actually available, before trying to use them (which also puts them in NHT for that). This applies for both BSRs as well as BSM receivers. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-04-09pimd: Process no-forward BSM packetSarita Patra
Topology Used: ============= Cisco---FRR4----FRR2 Initially PIM nbr is down between FRR4----FRR2 from FRR2 side Cisco is sending BSR packet to FRR4. Problem Statement: ================= No shutdown the PIM neighbor on FRR2 towards FRR4. FRR2, receives BSR packet immediately as the new neighbor comes up. This BSR packet is having no-forward bit set. FRR2 is not able to process the BSR packet, and drop the BSR packet. Root Cause: ========== When PIMD comes up, we start BSM timer for 60 seconds. Here, the value accept_nofwd_bsm is setting to false. FRR2, when receives no-forward BSR packet, it is getting accept_nofwd_bsm value as false. So, it drops, the no-forward BSM packet. Fix: === Set accept_nofwd_bsm as false after first BSM packet received. Signed-off-by: Sarita Patra <saritap@vmware.com>
2023-03-24*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-12pimd: fix unaligned accessesDavid Lamparter
These are in packed structs at weird offsets (e.g. 2 bytes), and as such need a memcpy to get them into proper alignment. It'd be even better if the pimd code used proper de/serialization, but let's get this improved one step at a time. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-07pim6d: IPV6 adjust in hash_calc_on_grp_rpsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07Revert "pim6d: IPv6-adjust BSM code"sarita patra
This reverts commit 809c11a9d87e0d12a5c3d3ca6906bc398a58de6c.
2022-07-07pim6d: remove unused variable neigh_src_strsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: add pimv6 support for bsmmsg_grpinfosarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: add pimv6 support for bsmmsg_rpinfosarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: add pimv6 support for bsm_hdrsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: Add pim_addr rp_addr in bsm_rpinfosarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: bsr nht handling for IPV6sarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: modify in_addr current_bsr to pim_addr current_bsrsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06pim6d: Pass pim_addr for pim_nht callbacks.sarita patra
For pim callbacks, we pass pim_addr as value, not pointer. So making it consistent for pim_nht callbacks. Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06pim6d: Adjust rpf_addr in rp_infosarita patra
In this PR, we are handling the rp_info after rpf_addr modified from prefix to pim_addr. Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12pimd: Disable receiving BSM on passive interfacesarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12pimd: Handling BSM send statistics for passive interfacesarita patra
Increment pim_ifstat_bsm_tx only when interface is passive disabled. Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-19*: Fix spelling of accomodateDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19*: Fix spelling of atleastDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-28pim6d: include IPv6 pseudoheader in TX checksumsDavid Lamparter
Lots of passing src/dst around, but it is what it is. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-25pim6d: Parse BSM packet for PIMv6Mobashshera Rasool
Modify pim_bsm_process to accomodate v4 and v6 address for parsing the received packet. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08pim6d: Modify pim_rp_del for PIMv4/PIMv6Mobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08pim6d: Add pim_get_all_mcast_group apiMobashshera Rasool
Added this api to fill all multicast group address based on IP version. For PIMv4 its 224.0.0.0/4, for PIMv6 its FF00::0/8. Changed the code where its being used currently. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08pim6d: Modify pim_rp_change api for pimv6Mobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-02Merge pull request #10657 from patrasar/pim_remove_in_addr_noneDavid Lamparter
[manual merge to edit comment, didn't want to incur another cycle] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-01pimd: replace inaddr_none with PIMADDR_ANYsarita patra
We can use PIMADDR_ANY instead of INADDR_NONE to initalize rp->rpf_addr when there is no rp configured for group_all. Signed-off-by: sarita patra <saritap@vmware.com>
2022-02-28pim6d: Adding show running for ipv6 mld commandsSai Gomathi N
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-26Merge pull request #10400 from opensourcerouting/pim6-compilefixDonald Sharp
pim6d: get running with ipv6 types throughout
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-16pim6d: IPv6-adjust BSM codeDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: IPv6-adjust pim_msg_send() and relatedDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: IPv6-adjust iface primary/DR addrsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: IPv6-adjust neigh->source_addrDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: IPv6-adjust various pim_sgaddr usesDavid Lamparter
Since `pim_sgaddr` is `pim_addr` now, that causes a whole lot of fallout anywhere S,G pairs are handled. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-08Merge pull request #10292 from opensourcerouting/pim6-addr-auxDonald Sharp
pimd: start tackling IPv6 address operations