summaryrefslogtreecommitdiffstats
path: root/pimd/pimd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: remove old bfd libraryIgor Ryzhov2021-05-071-0/+3
| | | | | | | This commit also adds missing `bfd_protocol_integration_set_shutdown` to ospf6d and pimd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* pimd: zassert => assertDavid Lamparter2021-04-231-1/+1
| | | | | | | No point in having pimd use zassert() while everything else uses plain assert(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Warn when we try to build MAXVIFS > 256Donald Sharp2020-09-121-0/+4
| | | | | | | | | | | 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>
* pimd: Cleanup some small memory leaks on exitDonald Sharp2020-07-161-0/+2
| | | | | | | 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>
* Merge pull request #5877 from donaldsharp/pim_shutdown_cleanupDonatas Abraitis2020-03-101-0/+2
|\ | | | | Pim shutdown cleanup
| * pimd: When shutting down stop the vxlan worker threadDonald Sharp2020-03-061-0/+2
| | | | | | | | | | | | Upon shutdown stop the vxlan worker thread. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Add accidently missed code during upstreaming processDonald Sharp2020-03-061-0/+2
|/ | | | | | | | | | 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>
* *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis2020-03-051-2/+2
| | | | | | Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* pimd: Make frr able to be built by gcc 10Tomas Korbar2020-02-201-0/+1
| | | | | | | | | | | | - 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>
* pimd: Free up zlookup structure lateDonald Sharp2019-03-141-2/+2
| | | | | | | 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>
* Treewide: use ANSI function definitionsRuben Kerkhof2019-01-241-2/+2
| | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* pimd: Remove pimgDonald Sharp2019-01-041-2/+1
| | | | | | | | 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>
* pimd: Move register_probe_time to pim_routerDonald Sharp2019-01-041-2/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move packet_process variable to pim_routerDonald Sharp2019-01-041-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move register_suppress_time into struct pim routerDonald Sharp2019-01-041-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert rpf_cache_refresh_delay_msec into pim_router structDonald Sharp2019-01-041-1/+1
| | | | | | | 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>
* pimd: Move the infinite_assert_metric global to pim_routerDonald Sharp2019-01-041-15/+15
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert qpim_t_periodic into the `struct pim_router` structureDonald Sharp2019-01-041-2/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move debugs into pim_router structureDonald Sharp2019-01-041-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Create a `struct pim_router` and move thread master into itDonald Sharp2019-01-041-2/+18
| | | | | | | | 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>
* *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-131-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: rename zlog_fer -> flog_errQuentin Young2018-08-141-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* pimd: Convert over to use LIB_ERR_XXX for zlog_errDonald Sharp2018-08-141-1/+3
| | | | | | | Convert, where appropriate, the zlog_err functions to zlog_ferr for the LIB_ERR_XXX enums Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: No need to call zprivs_terminate 2 timesDonald Sharp2018-08-031-2/+0
| | | | | | | 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>
* pimd: Fix ecmp_enable and ecmp_rebalance_enableDonald Sharp2018-06-071-2/+0
| | | | | | | | | | | 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>
* pimd: Move some data tracking variables per VRFDonald Sharp2018-03-181-6/+0
| | | | | | | 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>
* pimd: Make the rpf scan per vrf.Donald Sharp2018-03-181-1/+0
| | | | | | | | | 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>
* *: use clang's 'ForEachMacros' format style optionRenato Westphal2017-09-151-2/+1
| | | | | | | | | | | | | 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>
* *: make all daemons call frr_fini() on exitRenato Westphal2017-09-121-0/+2
| | | | | | This allow us to find real leaks more easily with tools like valgrind. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* pimd: Allow the keepalive time to be per vrf.Donald Sharp2017-07-281-4/+0
| | | | | | Allow the keepalive period to be per vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Make pim_ssmpingd.c 'struct pim_instance' awareDonald Sharp2017-07-241-5/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup pim_ssm.c to use 'struct pim_instance *'Donald Sharp2017-07-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert channel_oil_hash and list into 'struct pim_instance *'Donald Sharp2017-07-241-4/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move pim_ifchannel_list and vif array into 'struct pim_instance *'Donald Sharp2017-07-241-3/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert pim_rp.c to use 'struct pim_instance *'Donald Sharp2017-07-241-6/+13
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Remove pimg from pim_upstream.cDonald Sharp2017-07-241-5/+1
| | | | | | | 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>
* pimd: Refactore qpim_static_route_list into pim->static_routesDonald Sharp2017-07-241-12/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Refactor code to be in better spotsDonald Sharp2017-07-241-155/+1
| | | | | | | | 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>
* pimd: Create pim_get_pim_instanceDonald Sharp2017-07-241-0/+10
| | | | | | Create function to get the pim instance from the vrf_id Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimg: Actually properly create the pim socket per vrfDonald Sharp2017-07-241-4/+6
| | | | | | Create the actual pim socket per vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Save pim instance on vrf pointerDonald Sharp2017-07-241-35/+32
| | | | | | | | | | | | | 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>
* pimd: Modify pim_mroute_socket_[enable|disable] to be vrf awareDonald Sharp2017-07-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start conversion of socket and counters for VRFDonald Sharp2017-07-241-6/+2
| | | | | | | | 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>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-205/+188
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: update hash_create(), hash_create_size()Quentin Young2017-07-021-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* pimd: Fix zclient cleanup on shutdownDonald Sharp2017-06-301-0/+9
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Remove qpim_inaddr_anyDonald Sharp2017-06-021-3/+1
| | | | | | | | In prep for switching over to having PIM understand VRF remove the qpim_inaddr_any global variable and just use INADDR_ANY directly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: pim bfd supportChirag Shah2017-05-181-0/+1
| | | | | | | | | | | | | | | | | | All PIM Neighbors for a given pim interface is registered with BFD. Upon receiving BFD status down event, PIM Neighbor with BFD info is deleted. Add pim bfd configuraiton (CLI) per interface, '[no] ip pim bfd' Testing Done: Configure BFD under PIM interface on all neighbor routers, check bfd sessions up, remote end unconfigure BFD, results in BFD session down. Previous state was UP to New state DOWN, results in PIM neighbor delete behind that particular pim interface. Pim-smoke Results: Ran 94 tests in 7409.680s FAILED (SKIP=8, failures=2) Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* Merge pull request #537 from donaldsharp/vrf_stuffDavid Lamparter2017-05-171-11/+4
|\ | | | | Vrf stuff
| * *: Consolidate vrf_hooks into vrf_initDonald Sharp2017-05-161-11/+4
| | | | | | | | | | | | | | | | We only needed to add/change the vrf callbacks when we initialize the vrf subsystem. As such it is not necessary to handle the callbacks in any other way than through the init function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>