summaryrefslogtreecommitdiff
path: root/pimd/pim_rpf.h
AgeCommit message (Collapse)Author
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,yang: Reimplement RPF lookup vty in router pimNathan Bahr
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>
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-06pimd: modify rpf_addr from prefix to pim_addrsarita patra
Currently rpf_addr is of type struct prefix, but it's always a /32 host prefix. So changing it to pim_addr in order to support both IPV4 and IPV6. Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-06pimd: un-dependency-hell `pim_instance.h`David Lamparter
This is causing build issues on BSD by including (transitively) `linux/mroute6.h` - try to address by disentangling the headers a bunch. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-06pim6d: modify mrib_nexthop_addr from prefix to pim_addrsarita patra
Currently mrib_nexthop_addr is of type struct prefix, but it's always a /32 host prefix. So changing it to pim_addr in order to support both IPV4 and IPV6. Signed-off-by: sarita patra <saritap@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-16pim6d: IPv6-adjust RPF lookupsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-10pimd: Modifying in_addr to pim_addr in struct pim_nexthop for IPv6.sarita patra
Changed struct in_addr last_lookup to struct PIM_ADDR last_lookup which is to be used in both IPv4 and IPv6(Both MLD and IGMP). Reviewed-by: Mobashshera Rasool <mrasool@vmware.com> Signed-off-by: sarita patra <saritap@vmware.com>
2021-08-27pimd: de-circularize includesDavid Lamparter
pimd's include files are very interdependent. Let's chop that down a bit to gain some flexibility. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-11-15pimd: add caller string prefix to pim_rpf_update logsAnuradha Karuppiah
No functional change; log enhancements only. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-06-07pimd: Remove unnecessary boolean to pim_rpf_updateDonald Sharp
We already log whether or not we add nht tracking, having an additional boolean to say to log another line is a bit over the top. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-14lib: hashing functions should take const argumentsQuentin Young
It doesn't make much sense for a hash function to modify its argument, so const the hash input. BGP does it in a couple places, those cast away the const. Not great but not any worse than it was. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-04-02pimd: pim_nexthop_lookup should return true/falseDonald Sharp
The current reverse logic led to this code construct if (!pim_nexthop_lookup(...)) { //Do something successfull } This is backwards and will cause logic errors when people use this code. Fix to use true/false for success/failure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-24pimd: clear upstream rpf information when RP becomes not reachableSarita Patra
When route to RP gets modified, FRR receives a notification from zebra, and call the function pim_resolve_upstream_nh() to compute the nexthop and update upstream->rpf structure. Issue: In case when RP becomes not reachable, FRR only uninstall the mroute from the kernal, but not update the upstream->rpf structure. Fix: When FRR receives a notification from zebra saying RP becomes not reachable, then update the following fields. 1. update channel_oil incoming interface as MAXVIFS 2. Un-install the mroute from the kernel. 3. Switch upstream state from JOINED to NOTJOINED. 4. Clear the nexthop information of the upstream. Signed-off-by: Sarita Patra <saritap@vmware.com>
2018-10-19*: Replace hash_cmp function return value to a boolDonald Sharp
The ->hash_cmp and linked list ->cmp functions were sometimes being used interchangeably and this really is not a good thing. So let's modify the hash_cmp function pointer to return a boolean and convert everything to use the new syntax. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-17pimd: Move some data tracking variables per VRFDonald Sharp
There were a few more global variables that needed to be per vrf. So move them over. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Cleanup some basic crashes from mistakes made converting to vrfDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Convert pim_rp.c to use 'struct pim_instance *'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Refactor code to be in better spotsDonald Sharp
1) Create pim_instance.[ch] to allow us to handle the instance information there 2) Refactor some pim_rpf_ and some pim_rp commands into appropriate files and appropriate includes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-16pimd: Nexthop tracking supportChirag Shah
Add pim Nexthop tracking feature 1st part where, specific RP or Source address (unicast address) register with Zebra. Once nexthop update received from Zebra for a given address, scan RP or upstream entries impacted by the change in nexthop. Reviewed By: CCR-5761, Donald Sharp <sharpd@cumulusnetworks.com> Testing Done: Tested with multiple RPs and multiple *,G entries at LHR. Add new Nexthop or remove one of the link towards RP and verify RP and upstream nexthop update. similar test done at RP with multiple S,G entries to reach source. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-03-02pimd: Join/Prune AggregationDonald Sharp
Add the ability for PIM to send Join/Prunes as an aggregated message instead of individual messages for each S,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24pimd: Refactor pim_rpf_update to take a 'struct pim_rpf'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-17Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp
2016-12-21pimd: Add the ability to test if the RPF' is the sameDonald Sharp
Test the ability to see if two RPF' are the same or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Add basic nexthop lookup cached information.Donald Sharp
Cache the last time we looked up the nexthop for this particular address. Store time to usec accuracy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Rework approach for needing nbrsDonald Sharp
Pim sometimes needs the upstream rpf lookup to only take into account if we have a nbr out the selected interface or not. Move the code for this to a better spot so we can make a more intelligent decision here. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: switch pim_rpf.h to use 'struct prefix' for addressDonald Sharp
mrib_nexthop_addr and rpf_addr should be 'struct prefix' so that we can safely handle unnumbered data from a nexthop lookup in zebra Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Move rpf code into pim_rpf.hDonald Sharp
The pim_rpf code needs to be in pim_rpf.h as that it belongs in there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd - Fix rpf lookup to what it was originallyDonald Sharp
I tried to be smart and skirt around rpf lookup if I knew the incoming interface. This turns out to be not necessarily a good thing because we can easily have asymetrical routing. This fix removes the attempt to cache the ifp we received the incoming packet on and just lets the lookup work like it should. Additionally it removes the weird hardcoding of the rpf interface from the register stuff. Ticket: CM-12530 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> reb
2016-12-21pimd: Remove unnecessary QuaggaIdDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-20build: remove $Format tagsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-06-17pim: Fix NOCACHE to use incoming interfaceDonald Sharp
When the kernel sends a NOCACHE message to pim we were looking up the interface to use for the incoming multicast packet based upon the source. No need to do that trust that the kernel has properly identified it and use that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: merge pimd as of 2015-01-19David Lamparter
Welcome pimd to the Quagga daemon zoo! This is a merge of commit 77ae369 ("pimd: Log ifindex found for an interface when zebra lib reports a new connected address."), with the intermediate "reconnect" changes removed (c9adf00...d274381). d274381 is replaced with b162ab7, which includes some changes. In addition, 4 reconnect-related changes and 1 cosmetic one have been bumped out. The rebase command used to produce the branch that is merged here is: git rebase --onto b162ab7 c9adf00 77ae369 Note that 3 patches had their author rewritten from "Anonymous SR#108542 <>" (which is not a valid git author ID) to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address listed in the associated Savannah ticket) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>