summaryrefslogtreecommitdiff
path: root/pimd/pimd.c
AgeCommit message (Collapse)Author
2024-12-03pimd: Fix access-list memory leak in pimdCorey Siltala
Reset access-lists in pimd on terminate Signed-off-by: Corey Siltala <csiltala@atcorp.com> (cherry picked from commit d21a993f16dc23df6a1f1a7c81e9f562446437a0)
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-06-23pimd: Limit pim's ecmp to what zebra tells us is the multipathDonald Sharp
Zebra can be setup to use a value that is less than MULTIPATH_NUM. When pimd connects to zebra, zebra will inform pim about the MULTIPATH_NUM used. Let's use that value for figuring out our multipath value. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-28pim6d: Adding the base changesSai Gomathi N
Adding the file pim6_cmd.h and pim6d_cmd.c as the base changes for implementing the CLI changes Removed the pim_cmd_init from the stub file. Co-authored-by: Sarita Patra <saritap@vmware.com> Co-authored-by: Abhishek N R <abnr@vmware.com> Co-authored-by: Sai Gomathi N <nsaigomathi@vmware.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-14pim6d: IPv6-adjust pim_msg_send() and relatedDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: IPv6-adjust assert-related addrsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-12pim6d: add skeleton for IPv6 PIM daemonDavid Lamparter
This newborn pim6d is essentially an empty husk, but it does build without warnings or errors and has the build system integration prepared and working. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-07lib: remove old bfd libraryIgor Ryzhov
This commit also adds missing `bfd_protocol_integration_set_shutdown` to ospf6d and pimd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-23pimd: zassert => assertDavid Lamparter
No point in having pimd use zassert() while everything else uses plain assert(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-09-11pimd: Warn when we try to build MAXVIFS > 256Donald Sharp
We use the pim mroute socket for kernel notifications of events. Currently this is limited to 8 bits of data. There are patches coming down the pike in kernel land to allow this to expand. Rather than fix this and all the other places we assume MAXVIFS < 256 in the pim code right now. Leave a land mine for the developer doing this work to point them in the right direction. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-07-16pimd: Cleanup some small memory leaks on exitDonald Sharp
We were not properly cleaning up some memory in the pim mlag subsystem. Clean it up on exit. Signed-off-by: Donald Sharp <sharpc@cumulusnetworks.com>
2020-03-10Merge pull request #5877 from donaldsharp/pim_shutdown_cleanupDonatas Abraitis
Pim shutdown cleanup
2020-03-06pimd: When shutting down stop the vxlan worker threadDonald Sharp
Upon shutdown stop the vxlan worker thread. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06pimd: Add accidently missed code during upstreaming processDonald Sharp
There was some code missed during the upstreaming process due to code squash. Identify and put into a commit to keep code consistent and correct. Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com> Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-05*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis
Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-20pimd: Make frr able to be built by gcc 10Tomas Korbar
- Add extern modifier to some declarations in header file and move qpim_all_pim_routers_addr definition to pimd/pimd.c `GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors.` Taken from https://gcc.gnu.org/gcc-10/changes.html Signed-off-by: Tomas Korbar <tkorbar@redhat.com>
2019-03-14pimd: Free up zlookup structure lateDonald Sharp
When we are shutting down, delay the zlookup free to as late as possible since we may need it still Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-24Treewide: use ANSI function definitionsRuben Kerkhof
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-01-04pimd: Remove pimgDonald Sharp
The pimg data structure is only used in one spot to send the default vrf id to zebra upon startup. Add the default vrf id to the struct pim_router data structure and remove the pimg pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move register_probe_time to pim_routerDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move packet_process variable to pim_routerDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move register_suppress_time into struct pim routerDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Convert rpf_cache_refresh_delay_msec into pim_router structDonald Sharp
Move the rpf_cache_refresh_delay_msec into the pim_router since it should own the data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move the infinite_assert_metric global to pim_routerDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Convert qpim_t_periodic into the `struct pim_router` structureDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move debugs into pim_router structureDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Create a `struct pim_router` and move thread master into itDonald Sharp
Create a `struct pim_router` and move the thread master into it. Future commits will further move global varaibles into the pim_router structure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-13*: LIB_[ERR|WARN] -> EC_LIBQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: rename zlog_fer -> flog_errQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14pimd: Convert over to use LIB_ERR_XXX for zlog_errDonald Sharp
Convert, where appropriate, the zlog_err functions to zlog_ferr for the LIB_ERR_XXX enums Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-02pimd: No need to call zprivs_terminate 2 timesDonald Sharp
frr_fini and pim_free both call zprivs_terminate. There is no need for pim_free to call this function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-07pimd: Fix ecmp_enable and ecmp_rebalance_enableDonald Sharp
These commands were being accepted in all vrf's and affecting all vrf's behavior globally, since they were global variables. Modify the code to make these two commands work on a per-vrf basis. 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>
2018-03-17pimd: Make the rpf scan per vrf.Donald Sharp
We know the vrf that we are in when we need to initiate a rescan of the rpf cache. So pass it in and use that information. This should help the rescan at scale with several vrf's cutting out a lot of unnecessary work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-15*: use clang's 'ForEachMacros' format style optionRenato Westphal
This fixes the broken indentation of several foreach loops throughout the code. From clang's documentation[1]: ForEachMacros: A vector of macros that should be interpreted as foreach loops instead of as function calls. [1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-12*: make all daemons call frr_fini() on exitRenato Westphal
This allow us to find real leaks more easily with tools like valgrind. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-28pimd: Allow the keepalive time to be per vrf.Donald Sharp
Allow the keepalive period to be per vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Make pim_ssmpingd.c 'struct pim_instance' awareDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Cleanup pim_ssm.c to use 'struct pim_instance *'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Convert channel_oil_hash and list into 'struct pim_instance *'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Move pim_ifchannel_list and vif array into 'struct pim_instance *'Donald 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: Remove pimg from pim_upstream.cDonald Sharp
Move the upstream_list, hash and wheel into 'struct pim_instance' Remove all pimg to pim in pim_upstream 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: 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-24pimd: Create pim_get_pim_instanceDonald Sharp
Create function to get the pim instance from the vrf_id Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimg: Actually properly create the pim socket per vrfDonald Sharp
Create the actual pim socket per vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Save pim instance on vrf pointerDonald Sharp
This commit does these things: 1) Saves the pim instance created on the vrf pointer 2) Moves some initialization to the proper spot. 3) Remove vrf_id from 'struct pim_ssm' it is not needed 4) Removes some checks to prevent non-default vrf's from being created. 5) When creating the pim instance, save default vrf in pimg to allow backwards compatibility Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Modify pim_mroute_socket_[enable|disable] to be vrf awareDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Start conversion of socket and counters for VRFDonald Sharp
Convert the socket fd to be owned by the pimg pointer as well as the counters associated with the fd. This will allow us to future proof our code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>