summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2021-11-10pimd: Remove default from enum based switchDonald Sharp
enum based switches should never use default. It makes it very hard to fix and find issues when the enum is changed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-28Merge pull request #9682 from adrianomarto/mesh-group-fixRuss White
pimd: fixing command "no ip msdp mesh-group member"
2021-09-28pimd: fixing command "no ip msdp mesh-group member"Adriano Marto Reis
Deleting a mesh-group member no longer deletes the mesh-group. Complete bug description at: https://github.com/FRRouting/frr/issues/9664 Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
2021-09-27pimd: fix UAF/heap corruption in BSM codeDavid Lamparter
This `XFREE()` call is in plainly in the wrong spot. `rp_all` (the 224.0.0.0/4 entry) isn't supposed to be free'd ever, and the conditional above makes quite clear that it remains in use. It may be possible to exploit this as a heap corruption bug, maybe even as RCE. I haven't tried; I randomly noticed this while working on the BSM code. Luckily this code is only run by the CLI for the clear command, so the surface is very small. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-27pimd: reformat after dropping indent levelsDavid Lamparter
Intentionally separate here because the previous patch does a whole bunch of "move stuff up 1 level of indentation", and reviewing that is easier when you can use the ignore-whitespace option on diff. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-27pimd: IGMP memberships are not querier specificDavid Lamparter
IGMP group/source memberships are a property of the interface; the particular IP address that the querier used to collect the data is irrelevant. ... and IGMP packets get delivered only once to pimd anyway, since we receive them on the "global" per-VRF IGMP socket. (The one in igmp_sock is only used for sending queries.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-18pimd: change ranges to 1..max, type align with IETF YANG.Christian Hopps
While defaults are good picks for "reasonable" guesses, min and max range values really aren't. Operators and experimenters often like to configure "unreasonable" values to stress test, tests boundary conditions and explore innovations. With that in mind, change all ranges to 1..max (of type). While we're here add optional ignored values in the "no" CLI forms. Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-07Merge pull request #9253 from donaldsharp/igmp_noDonatas Abraitis
pimd: Allow more permisive versions of some no commands
2021-08-01pimd: Allow more permisive versions of some no commandsDonald Sharp
Some no commands were not accepting values and left us in a situation where a cut-n-paste of the non-no line would not be properly accepted. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-07-29*: cleanup interface node installationIgor Ryzhov
The only difference in daemons' interface node definition is the config write function. No need to define the node in every daemon, just pass the callback as an argument to a library function and define the node there. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-07-26pimd: Allow join prune intervals to be as small as 5 secondsDonald Sharp
Allow the join-prune interval to be as small as 5 seconds instead of limiting the value to 60. This can and will come at a price of being able to converge less mroutes. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-07-22Merge pull request #8983 from mobash-rasool/pim-upstreaming-activityDonald Sharp
pimd: Minor fixes for BSM Show CLI and Hold Timer CLI
2021-07-06pimd: make pim interface hold interval range 1-630github login name
Making the interface holdtime range to 3.5 times the hello-time As per 7761, Section 4.11: The Holdtime in a Hello message should be set to (3.5 * Hello_Period), giving a default value of 105 seconds. Therefore providing the user also to configure max upto 3.5 times the hello timer interval. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-06pimd: To print querierIP address on the querier and nonQuerier IGMP enabled intfgithub login name
1. Add the querierIP object to igmp_sock datastruct to save the IP address of the querier. Management of the querierIP object is added. 2. To show the querier IP address in the CLI "show ip igmp interface". 3. To add the json object querierIP for querier IP address in the json CLI "show ip igmp interface json". Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-05pimd: Adding BSM status in the show commandsgithub login name
Adding BSM status in the CLI and json output for "show ip pim interface" Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-01pimd: support MSDP global timers configurationRafael Zalamena
Users can now configure: * Hold time * Keep alive * Connection retry Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-07-01Merge pull request #8871 from opensourcerouting/msdp-peer-reworkDonald Sharp
pimd: rework MSDP peer and add tests
2021-06-29pimd: make show ip mroute output consistentJafar Al-Gharaibeh
We had 3 different string output formats in various places. Make them all the same. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2021-06-25pimd: allow MSDP group name 'default'Rafael Zalamena
Don't assign a default group name for non meshed group peers, instead use a flag. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25pimd: rework MSDP northbound integrationRafael Zalamena
Simplify the MSDP handling functions and allow source changes. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-09pimd: rework MSDP mesh-group codeRafael Zalamena
Fully utilize the northbound to hold pointers to our private data instead of searching for data structures every time we need to change a configuration. Highlights: * Support multiple mesh groups per PIM instance (instead of one) * Use DEFPY instead of DEFUN to reduce code complexity * Use northbound private pointers to store data structures * Reduce callback names size Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-05-20Merge pull request #8616 from donaldsharp/pim_orderingMartin Winter
pimd: There exists a path where on vrf bringup we do not create the p…
2021-05-13lib: adapt to version 2 of libyangChristian Hopps
Compile with v2.0.0 tag of `libyang2` branch of: https://github.com/CESNET/libyang staticd init load time of 10k routes now 6s vs ly1 time of 150s Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-12pimd: Remove pim->vrf_id and use pim->vrf->vrf_idDonald Sharp
VRF creation can happen from either cli or from knowledged about the vrf learned from zebra. In the case where we learn about the vrf from the cli, the vrf id is UNKNOWN. Upon actual creation of the vrf, lib/vrf.c touches up the vrf_id and calls pim_vrf_enable to turn it on properly. At this point in time we have a pim->vrf_id of UNKNOWN and the vrf->vrf_id of the right value. There is no point in duplicating this data. So just remove all pim->vrf_id and use the vrf->vrf_id instead since we keep a copy of the pim->vrf pointer. This will remove some crashes where we expect the pim->vrf_id to be usable and it's not. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-09Merge pull request #8631 from dslicenc/pimd-timer-fixDavid Lamparter
2021-05-05pimd: stop displaying global parameters in each vrfDon Slice
Problem reported that when certain pim commands were entered, they showed up duplicated in the configuration both under default instance and every vrf (whether pim was used there or not.) This was because these particular parameters are global only and the function doing the display would repeat for each vrf. This fix only displays those in the default case (and removes them from the help for entering under a vrf.) Signed-off-by: Don Slice <dslice@nvidia.com>
2021-05-04Merge pull request #8614 from opensourcerouting/msdp-fixesDonald Sharp
pimd: MSDP trivial fixes
2021-05-03pimd: cleanup & convert bsm_rpinfo to TS listDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03pimd: cleanup & convert bsm_info to TS listDavid Lamparter
Just some cleanup before I touch this code; switching to typesafe list macros & putting the data directly inline. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03pimd: reduce code duplicationRafael Zalamena
Standardize a function to get the current VRF node name. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23pimd: support BFD profiles configurationRafael Zalamena
Allow users to pre configure BFD sessions with a profile. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23pimd: rework BFD integrationRafael Zalamena
Rewrite the BFD integration code to use the new library. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-25pimd: in 'no ip pim hello' add hold time as optional when hello interval givenMobashshera Rasool
Issue: User is allowed to configure only hello without hold timer but when undo config, the hold timer is mandatory as shown below: FRR-4(config-if)# ip pim hello 10 <cr> (1-180) Time in seconds for Hold Interval FRR-4(config-if)# ip pim hello 10 FRR-4(config-if)# no ip pim hello 10 (1-180) Time in seconds for Hold Interval FRR-4(config-if)# no ip pim hello 10 % Command incomplete: no ip pim hello 20 Fix: Making the hold timer as optional when undo config. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-03-25pimd: Validation that hello should be less than hold time config.Mobashshera Rasool
Also included display of hold time in CLI 'show ip pim int <intf>' cmd and json commands. Issue: PIM neighbor not coming up if hold time is less than hello timer since hello is sent every 4 sec and hold is 1 sec, because of this nbr is flapping Fix: Do not allow configuration of hold timer less than hello timer Also reset the value of hold timer to 3.5 times to hello whenever only hello is modified so that the relationship holds good. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-03-02pimd: show ip mroute column realignWesley Coakley
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-02-15Merge pull request #8044 from SaiGomathiN/nsgDonald Sharp
pimd: json support added
2021-02-09pimd: json support addednsaigomathi
Modify code to add JSON format output in show command. "show ip igmp [vrf NAME] join" and "show ip igmp vrf all join" with proper formatting Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-02-02*: fix all backetsIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-01-08pimd : Added the command to clear the pim bsr data.vdhingra
This command has been added in the context of PIM BSM functionality. This command will clear the data structs having bsr information. Co-authored-by: Sarita Patra <saritap@vmware.com> Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-12-15Merge pull request #7739 from mobash-rasool/pim-fixesJafar Al-Gharaibeh
pimd: correcting the definition for Mroute flag "R"
2020-12-15pimd: correcting the definition for Mroute flag "R"Mobashshera Rasool
The flag "R" in below display description denotes the SGRpt Pruned but the description shows something else hence correcting the definition. R2(config)# do show ip mroute IP Multicast Routing Table Flags: S- Sparse, C - Connected, P - Pruned R - RP-bit set, F - Register flag Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-14*: Replace s_addr check agains 0 with INADDR_ANYDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-01pimd: mesh group not removed when configured for multiple groupsSarita Patra
Issue: Configure msdp mesh mg1 for 2 groups. ip msdp mesh-group mg1 member 1.1.1.1 ip msdp mesh-group mg1 member 1.1.1.2 Remove mg1 for 1.1.1.1 no ip msdp mesh-group mg1 member 1.1.1.1 mg1 for 1.1.1.1 still present. This is fixed. Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-12-01pimd: rp not removed when configured for multiple groupsSarita Patra
Issue: Configure RP. ip pim rp 20.0.0.1 239.1.1.1/32 ip pim rp 20.0.0.1 239.1.1.2/32 Remove RP. no ip pim rp 20.0.0.1 239.1.1.1/32 Rp is not removed. This is fixed now. Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-20pimd: fix formatting in pim_cmd.cMark Stapp
Fix whitespace/indentation in pim_cmd.c Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-11-20pimd: fix compilation errors in pim_cmd.cMark Stapp
Fix buffer sizes to eliminate compiliation warnings. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-11-19Merge pull request #6145 from patrasar/pim_nb_code_upstreamDonald Sharp
pimd: northbound backend code
2020-11-18pimd: fix indentation issuesSarita Patra
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-18pimd: A buffer may be used uninitedDonald Sharp
If we screw up and don't have the right flags we'll print out garbage. At the very least just print out nothing. Signed-off-by: Donald Sharp <sharp@nvidia.com>
2020-11-06pimd: Northbound implementation for rp commands.Sarita Patra
ip_pim_rp ip_pim_rp_prefix_list no_ip_pim_rp no_ip_pim_rp_prefix_list module: frr-pim-rp augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol/frr-pim:pim/frr-pim:address-family: +--rw rp +--rw static-rp +--rw rp-list* [rp-address] +--rw rp-address ietf-inet-types:ip-address +--rw (group-list-or-prefix-list)? +--:(group-list) | +--rw group-list* ip-multicast-group-address-prefix +--:(prefix-list) +--rw prefix-list? plist-ref Signed-off-by: Sarita Patra <saritap@vmware.com>