summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2024-09-27pimd: fix autorp CLI bugsBarry A. Trent
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-24pimd,yang: Implement AutoRP CLI and NB config pathNathan Bahr
New CLI commands added: router pim [vrf NAME] autorp discovery autorp announce RP-ADDR [GROUP | group-list PREFIX-LIST] autorp announce {scope (1-255) | interval (1-65535) | holdtime (0-65535)} autorp discovery Enables Auto RP discovery for learning dynamic RP information using the AutoRP protocol. autorp announce RP-ADDR [GROUP | group-list PREFIX-LIST] Enable announcements of a candidate RP with the given group range, or prefix list of group ranges, to an AutoRP mapping agent. autorp announce {scope (1-255) | interval (1-65535) | holdtime (0-65535)} Configure the parameters of the AutoRP announcement messages. The scope sets the packet TTL. The interval sets the time between TX of announcements. The holdtime sets the hold time in the message, the time the mapping agent should wait before invalidating the candidate RP information. debug pim autorp Enable debug logging of the AutoRP protocol show ip pim [vrf NAME] autorp [json] Show details of the AutoRP protocol. To view learned RP info, use the existing command 'show ip pim rp-info' Extend pim yang for new configuration: augment /frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-pim:pim/frr-pim:address-family: +--rw rp +--rw auto-rp +--rw discovery-enabled? boolean +--rw announce-scope? uint8 +--rw announce-interval? uint16 +--rw announce-holdtime? uint16 +--rw candidate-rp-list* [rp-address] +--rw rp-address inet:ip-address +--rw (group-or-prefix-list)? +--:(group) | +--rw group? frr-route-types:ip-multicast-group-prefix +--:(prefix-list) +--rw prefix-list? plist-ref Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-23pimd: add show commands for igmp proxy joinsBarry A. Trent
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-20pimd, yang: add cli for igmp proxyBarry A. Trent
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-09pimd: candidate BSR/RP show commands, move under ip pim bsrJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09pimd: Candidate-BSR supportJafar Al-Gharaibeh
Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09pimd: Candidate-RP supportJafar Al-Gharaibeh
Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-22Merge pull request #16450 from nabahr/static_joinsDonald Sharp
PIM: Implement static IGMP joins without an IGMP report
2024-08-15pimd, yang: Implement igmp static-group commandNathan Bahr
This will add a static IGMP group that does not rely on an underlying socket join which sends traffic to the cpu unneccesarily. Instead, the groups are joined directly without any IGMP interactions. New command is under interfaces, 'ip igmp static-group ...'. Added an alias for 'ip igmp join ...' to 'ip igmp join-group'. Moved IGMP join groups to new yang list "join-group" and reused the "static-group" list for the IGMP static groups. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-07-31pimd: fix possible NULL dereferenceRafael Zalamena
Coverity scan ID: 1598684 Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-29pimd: add support for MSDP authenticationRafael Zalamena
Implement MSDP MD5 authentication connection support. Implementation details: - Move the MSDP socket creation code to a generic function so it can be parametrized to be used with/without authentication. - The MSDP peer connection will not change when the configuration is set, instead it will only be applied next connection or when `clear ip msdp peer A.B.C.D` is called. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-27pimd: MSDP SA filteringRafael Zalamena
Implement MSDP peer incoming/outgoing SA filter. Note ---- Cisco extended access list has a special meaning: the first address is the source address to filter. Example: ! The rules below filter some LAN prefix to be leaked out access-list filter-lan-source deny ip 192.168.0.0 0.0.255.255 224.0.0.0 0.255.255.255 access-list filter-lan-source permit any router pim msdp peer 192.168.0.1 sa-filter filter-lan-source out ! The rules below filter some special management group from being ! learned access-list filter-management-group deny 230.0.0.0 0.255.255.255 access-list filter-management-group permit any router pim msdp peer 192.168.0.1 sa-filter filter-management-group in Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-22pimd: fix compile warningsJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-07-16pimd, lib, vtysh: Added new 'router pim[6] [vrf NAME]' config nodeNathan Bahr
Moved all existing global/vrf PIM config to the new subnode. Existing configuration updated to be hidden and deprecated. Both versions of configuration still work together. Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-05-08pimd: fix dr-priority rangeDavid Lamparter
0 is a valid DR priority. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-04-05pimd: pim mlag summary should display the down connection status.Rajesh Varatharaj
command 'show ip pim mlag summary json' should display 'mlagConnUp', 'mlagPeerConnUp', and 'mlagPeerZebraUp' when the connection is down. Fix: Added 'json_object_boolean_false_add()' for these objects. Ticket: # Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
2024-02-04*: use af-specific autocompletion for prefix-lists when possibleIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-10-29*: modify empty json helper functionChirag Shah
Modify empty json object to take input obj instead of allocating always one. There are situation where in error condition or no data case print empty json (`{}`) with already allocated Signed-off-by: Chirag Shah <chirag@nvidia.com>
2023-04-11pimd: Option to get IGMP groups and sources for a particular interfacePooja Jagadeesh Doijode
1. Added interface name, group address and detail option to existing "show ip igmp groups" so that user can retrieve all the groups or a particular group for an interface. Detail option shows the source information for the group. With that, the show command looks like: "show ip igmp [vrf NAME$vrf_name] groups [INTERFACE$ifname [GROUP$grp_str]] [detail$detail] [json$json]" 2. Changed pim_cmd_lookup_vrf() to return empty JSON if VRF is not present 3. Changed "detail" option to print non pretty JSON 4. Added interface name and group address to existing "show ip igmp sources" so that user can retrieve all the sources for all the groups or, all the sorces for a particular group for an interface. With that, the show command looks like: "show ip igmp [vrf NAME$vrf_name] sourcess [INTERFACE$ifname [GROUP$grp_str]] [json$json]" Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@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>
2023-01-27*: fix non-const northbound XPath format stringsDavid Lamparter
Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-20pimd: Move "show ip pim bsm-database" cmd to DEFPYSarita Patra
Added common pim_show_bsm_db_helper to suppport both PIM and PIMV6. pim_show_bsm_db is moved to pim_cmd_common.c file. Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20pimd: Move "show ip pim bsrp-info [vrf] [json]" cmd to DEFPYSarita Patra
Added pim_show_group_rp_mappings_info_helper to suppport both PIM and PIMV6. pim_show_group_rp_mappings_info() is moved to pim_cmd_common.c file. Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20pimd: Add vrf optional parameter in "show ip pim bsr" cmdSarita Patra
Added common API pim_show_bsr_helper to suppport both PIM and PIMV6. pim_show_bsr() is moved to pim_cmd_common.c file. Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20pim6d: Add [no] ipv6 pim unicast-bsm" commandSarita Patra
Introduced common api pim_process_unicast_bsm_cmd, pim_process_no_unicast_bsm_cmd which will process both "[no] ip pim unicast-bsm" command and "[no] ipv6 pim unicast-bsm" command. Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20pim6d: Add [no] ipv6 pim bsm" commandSarita Patra
Introduced common api pim_process_bsm_cmd, pim_process_no_bsm_cmd which will process both "[no] ip pim bsm" command and "[no] ipv6 pim bsm" command. Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-13Merge pull request #12066 from opensourcerouting/cleanup-cli-xrefDonald Sharp
*: clean up various CLI-related bits
2022-10-12Merge pull request #12074 from donaldsharp/lib_debugsDonatas Abraitis
*: Create and use infrastructure to show debugs in lib
2022-10-10pim6d: Fix RpAddress in "show ipv6 pim bsm-database"Sarita Patra
RpAddress is showing wrong value in "show ipv6 pim bsm-database" cli. This is fixed now. Issue: #12089 Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-07*: Create and use infrastructure to show debugs in libDonald Sharp
There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-06*: fix some malformed CLI docstringsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-09-06pimd, pim6d: Changing IGMP to GM in debug macrosSai Gomathi N
Changing PIM_DO_DEBUG_IGMP_EVENTS to PIM_DO_DEBUG_GM_EVENTS PIM_DO_DEBUG_IGMP_PACKETS to PIM_DO_DEBUG_GM_PACKETS PIM_DO_DEBUG_IGMP_TRACE to PIM_DO_DEBUG_GM_TRACE PIM_DO_DEBUG_IGMP_TRACE_DETAIL to PIM_DO_DEBUG_GM_TRACE_DETAIL PIM_DONT_DEBUG_IGMP_EVENTS to PIM_DONT_DEBUG_GM_EVENTS PIM_DONT_DEBUG_IGMP_PACKETS to PIM_DONT_DEBUG_GM_PACKETS PIM_DONT_DEBUG_IGMP_TRACE to PIM_DONT_DEBUG_GM_TRACE PIM_DONT_DEBUG_IGMP_TRACE_DETAIL to PIM_DONT_DEBUG_GM_TRACE_DETAIL PIM_MASK_IGMP_EVENTS to PIM_MASK_GM_EVENTS PIM_MASK_IGMP_PACKETS to PIM_MASK_GM_PACKETS PIM_MASK_IGMP_TRACE to PIM_MASK_GM_TRACE PIM_MASK_IGMP_TRACE_DETAIL to PIM_MASK_GM_TRACE_DETAIL to be used for both IGMP and MLD debugs. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-26pimd: Modifying member of pim_instance to accomodate IPv6 changesSai Gomathi N
Modifying igmp_group_count of struct pim_instance to gm_group_count which is to be used for both IGMP and MLD. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-15pimd: vrf may be NULL from pim_cmd_lookup_vrfDonald Sharp
The call into pim_cmd_lookup_vrf may be NULL and dereferencing it before ensuring that the vrf pointer is non-NULL is a good way to crash. A crash can be initiated in pim: eva# show ip msdp vrf NOEXIST mesh-group vtysh: error reading from pimd: Permission denied (13)Warning: closing connection to pimd because of an I/O error! eva# 2022/08/15 11:47:38 [PHJDC-499N2][EC 100663314] STARVATION: task vtysh_rl_read (560b77f76de6) ran for 16777ms (cpu time 0ms) eva# Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-01pim6d: Implementing "clear ipv6 pim interface traffic" command.Abhishek N R
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-07-19pim6d: Implementing "clear ipv6 pim interfaces" command.Abhishek N R
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-07-13Merge pull request #11598 from patrasar/pim_get_instanceDavid Lamparter
2022-07-12pimd: Avoid unnecessary vrf lookupSarita Patra
In several places, we are getting the vrf structure using vrf_lookup_by_name(). Again we are passing vrf->vrf_id to pim_get_pim_instance() to get the pim_instance. The API pim_get_pim_instance() again get the VRF structure using vrf_lookup_by_id(). This is avoided in this PR. Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-12pimd: fix unaligned accessesDavid Lamparter
These are in packed structs at weird offsets (e.g. 2 bytes), and as such need a memcpy to get them into proper alignment. It'd be even better if the pimd code used proper de/serialization, but let's get this improved one step at a time. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-08Merge pull request #10592 from patrasar/master_pimv6_bsmDavid Lamparter
2022-07-07pim6d: Adjust pim_show_bsm_db for IPV6sarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: add pimv6 support for bsmmsg_rpinfosarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: add pimv6 support for bsm_hdrsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: Add pim_addr rp_addr in bsm_rpinfosarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pim6d: modify in_addr current_bsr to pim_addr current_bsrsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07pimd: Fix description for "clear ip mroute" cmdSarita Patra
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-06Merge pull request #9307 from SaiGomathiN/sai-nhtDonatas Abraitis
pimd: json support for nexthop
2022-06-30pimd, pim6d: Adding json support for show ipv6 nexthopSai Gomathi N
Moving the reusable code of pim_show_nexthop apis to common file pim_cmd_common.c file and adding the json support for show ipv6 pim nexthop Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-06-30pimd: json support for nexthopnsaigomathi
Problems Identified: show ip pim nexthop cli didn't have json extension and show ip pim vrf all upstream have improper json format Description: show ip pim nexthop command shows the nexthops that are being used. Added json support for the command. show ip pim vrf all upstream displays upstream information for all vrfs about a S,G mroute. Formatted the json structure for this command. Signed-off-by: nsaigomathi <nsaigomathi@vmware.com>