summaryrefslogtreecommitdiff
path: root/pimd/pim_static.c
AgeCommit message (Collapse)Author
2023-09-19pimd: Use a better name for oil_parentDonald Sharp
Use oil_incoming_vif instead of oil_parent. I had to go look this up as that I failed to remember that the linux kernel calls this parent for some bizarre reason. 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-28pimd: fix static mroute to also take into account the input interfaceJafar Al-Gharaibeh
Allow the same group/source route to be configured on more than one interface. Currently FRR doesn't allow adding the same mroute on different input interfaces. Current behavior, if we have the following config: ``` interface eth1 ip mroute eth0 239.0.0.1 interface eth2 ip mroute eth0 239.0.0.1 ``` Only one multicast route will be installed with an input interface of the last interface configured. Signed-off-by: Nathan Bahr <nbahr@atcorp.com> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.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-02-28pim6d: Adding show running for ipv6 mld commandsSai Gomathi N
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-16pim6d: IPv6-adjust static multicast routesDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-22*: cleanup ifp->vrf_idIgor Ryzhov
Since f60a1188 we store a pointer to the VRF in the interface structure. There's no need anymore to store a separate vrf_id field. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-12-14*: Replace s_addr check agains 0 with INADDR_ANYDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-06*: Finish off the __PRETTY_FUNCTION__ to __func__Donald Sharp
FINISH IT Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-11-15pimd: set mfcc_parent at the time of MFCC programmingAnuradha Karuppiah
mfcc_parent for an (S, G) entry was being updated on any upstream RPF change. With the change to use RPT for (S,G) in some cases we can no longer do that. Instead the upstream entry's RPF neigbor is managed separately form the channel_oil's mfcc_parent i.e. via NHT. And the mfcc_parent is evaluated at the time of mroute programming. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15pimd: decide between SPT based and RPT based forwardingAnuradha Karuppiah
An (S,G) mroute can be created as a result of rpt prune. However that entry needs to stay on the parent (*,G)'s tree (IIF) till a decision is made to switch the source to the SPT. The decision to stay on the RPT is made based on the SPTbit setting according to - RFC7761, Section 4.2 “Data Packet Forwarding Rules” However those rules are hard to achieve when hw acceleration i.e. control and data planes are separate. So instead of relying on data we make the decision of using SPT if we have decided to join the SPT - Use_RPT(S,G) { if (Joined(S,G) == TRUE // we have decided to join the SPT OR Directly_Connected(S) == TRUE // source is directly connected OR I_am_RP(G) == TRUE) // RP //use_spt return FALSE; //use_rpt return TRUE; } To make that change some re-org was needed - 1. pim static mroutes and dynamic (upstream mroutes) top level APIs have been separated. This is to limit the state machine to dynamic mroutes. 2. c_oil->oil.mfcc_parent is re-evaluated based on if we decided to use the SPT or stay on the RPT. 3. upstream mroute re-eval is done when any of the criteria involved in Use_RPT changes. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-07-18pimd: Add pim_channel_oil_change_iifDonald Sharp
Add a function that allows you to modify the channel oil's incoming interface and to appropriately install/remove it from the kernel. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-19pimd: ALLOC functions cannot fail.Donald Sharp
There is no need to check for ALLOC function failures in the code base. If we cannot get more memory we assert. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-25pimd: Convert to using an ifindex_t for the vifDonald Sharp
Let's stay consistent in the data type for the vif index Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-25pimd: Prevent crash from using pim static mroutesDonald Sharp
If you have an interface being added to a static mroute and that interface has been configured w/ pim but does not have a valid ip address yet, we do not create a VIF for that device yet. As such when we attempt to assign the vif array in the pim static data structure we attempt to write into -1 of that array. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-24Treewide: use ANSI function definitionsRuben Kerkhof
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2018-07-08pimd: Remove unnecessary alloc failuresDonald Sharp
Remove from pim unnecessary alloc failure testing as that alloc failure will cause an assert. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Put 'struct pim_instance *' as the first function parameterDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Convert vif and ifindex lookups to use 'struct pim_instance *'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Refactore qpim_static_route_list into pim->static_routesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Fix c_oil->pim set spotDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Set c_oil->pim for static routesDonald Sharp
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-07-13*: ditch vty_outln(), part 1 of 2David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-29*: use vty_outlnQuentin Young
Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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-02-24pimd: Get Static mroutes displaying againDonald Sharp
The static mroutes were making the assumption that the vif index and the ifindex were the same. This is not necessarily the case. Additionally if we are displaying a *,G route only display the G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-17Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp
2016-12-21pimd: Clarify pim_mroute_[add|del] function debuggingDonald Sharp
When debugging is turned on for 'debug mroute' we are unable to tell when a mroute has been added or deleted from the mrib. Notice when we do it and who called it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21pimd: Remove unnecessary QuaggaIdDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix use of 0 for NULLDonald Sharp
pimd uses allot of 0's to represent NULL. Not a good programming practice. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-20build: remove $Format tagsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-10-20pimd: don't leak original_s_route on errorChristian Franke
original_s_route is allocated on the heap and was not freed during the error case. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-08-18*: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma
(cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)
2016-07-12pimd: Refactor pim_mroute_add and _delDonald Sharp
The struct mfcctl should not be passed around. Pass around the channel oil instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-07-12pimd: Refactor 'struct static_route' to use channel_oilDonald Sharp
The 'struct static_route' data structure duplicated a decent bit of what is the in the struct channel_oil. Refactor. This will set us up for further cleanup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-17pimd: Separate pim vif index spot from ifindexDonald Sharp
Allow pim to separate out the pim vif index from the ifindex. This change will allow pim to work with up to 255(MAXVIFS) interfaces, while also allowing the interface ifindex to be whatever number it needs to be. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-01pimd: Add support for displaying ip mrouteDonald Sharp
When you enter a static mroute under an interface the 'show run' is not displaying this information. Add code to allow this. Ticket: CM-11257 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
2016-05-25pimd: Fix size_t zlog_err format string warningPaul Jakma
* fc1c114aa / "pimd: Fix warning", the size_t arg should have a %zu format.
2016-05-25pimd: Fix warningMartin Winter
Fix long unsigned / unsigned mixup Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2016-05-25pimd: add support for configuring multicast static routesJafar Al-Gharaibeh
Hi, This patch adds the ability to configure multicast static routes directly into pimd. Two source files are introduced to implement the new feature in addition to changes to existing files. Here is how it can be used the CLI: interface <incoming interface> ip mroute <outgoing interface> <group addr> # for asm or ip mroute <outgoing interface> <group addr> <source> # for ssm Please let me know if you have any questions or concerns, Regards, Jafar Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>