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>
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>
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>
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>
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>
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>
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>
Modifying igmp_watermark_limit of struct pim_instance
to gm_watermark_limit which is to be used for both IGMP and MLD.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
For show ip pim interface traffic cli, doing the below changes
1. Changing DEFUN to DEFPY
2. Move the whole code to a common api and modify it so that can
be reused for pimv6.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Moving pim_show_interface_traffic and pim_show_interface_traffic_single
to pim_cmd_common.c from pim_cmd.c to make it common to
pimd and pim6d.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Moving the common lines of pim_show_join_vrf and pim_show_join_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
the `show ip pim interface [x] traffic` command was deciding
to skip display of interfaces if they happened to be down at
that moment. This of course does not make a bunch of sense
to limit the output for a interface that may have sent data
in the past.
This fixes this test crash:
rnode = <lib.topogen.TopoRouter object at 0x7fc755be3880>, dut = 'c1', input_dict = {'c1': {'c1-l1-eth2': ['helloTx', 'helloRx']}}, output_dict = {'c1': {}}
def show_pim_intf_traffic(rnode, dut, input_dict, output_dict):
show_pim_intf_traffic_json = run_frr_cmd(
rnode, "show ip pim interface traffic json", isjson=True
)
output_dict[dut] = {}
for intf, data in input_dict[dut].items():
> interface_json = show_pim_intf_traffic_json[intf]
E KeyError: 'c1-l1-eth2'
/home/sharpd/frr8/tests/topotests/lib/pim.py:1496: KeyError
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Moving the common lines of pim_show_nexthop_lookup cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_nexthop cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_neighbors_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_neighbors cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_local_membership cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_jp_agg cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_interface_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_interface cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Moving the common lines of pim_show_channel cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Implementing debug pimv6 zebra command for debugging about
the events from zebra that come up through the ZAPI.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Implementing debug pimv6 packetdump send and recv coomands for debugging
of pimv6 packet sent and received which are dumped.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Implementing pimv6 packets debug to information about packet generation for sending
and about packet handling from a received packet.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Implementing debug pimv6 nht command for PIMv6 nexthop tracking.
It will display information about RPF lookups and information about when a nexthop changes.
debug pimv6 nht detial for for PIMv6 nexthop in detail.This is not enabled by default.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Added a new cli command "ip pim passive" in the interface context,
to disable sending of pim control packets on the interface.
Signed-off-by: sarita patra <saritap@vmware.com>
There's a common pattern of "get VRF context for CLI node" here, which
first got a helper macro in zebra that then permeated into pimd.
Unfortunately the pimd copy wasn't quite adjusted correctly and thus
caused two coverity warnings (CID 1517453, CID 1517454).
Fix the PIM one, and clean up by providing a common base macro in
`lib/vty.h`.
Also rename the macros (add `_VRF`) to make more clear what they do.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Modifying the "mld_group_watermark_cmd" to "ipv6_mld_group_watermark_cmd"
and "igmp_group_watermark_cmd" to "ip_igmp_group_watermark_cmd" for consistency.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
frr(config-if)# ip igmp join 232.1.1.1 10.10.10.10
frr(config-if)# do sh ip igmp sources
Interface Address Group Source Timer Fwd Uptime
ens192 232.1.1.1 10.10.10.10 04:10 N 00:00:10
frr(config-if)#
The above output is misaligned and is having Address field which is not
required here.
Fixing it.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Adding the Interface level config command
ipv6 mld last-member-query-interval (1-65535)
This command can be use to tune the response time for group specific queries.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding the Interface level config command
ipv6 mld last-member-query-count (1-255)
This command can be use to tune the number of Multicast-Address- Specific Queries
sent before the router assumes there are no remaining listeners for an address on a link.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding the Interface level config command
ipv6 mld query-max-response-time <1-65535>
This command can be use to tune the max response time for general queries.
The number of seconds represented by the [Query Response Interval] must be less than the [Query Interval]
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding new show CLI to display regarding pim neighbors.
Changing DEFUN to DEFPY for "show ip pim neighbor" command.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding the new cli to display pim local membership information.
Changing DEFUN to DEPFY for "show ip pim local-membership"
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding show ipv6 pim join and show ipv6 pim vrf all join
CLIs to display pim join related information and
formatted the json output for "show ip pim join" and
"show ip pim vrf all join" commands.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding show ipv6 pim interface and show ipv6 pim vrf all interface
CLIs to display pim enabled interface informations and
formatted the json output for "show ip pim interface" and
"show ip pim vrf all interface" commands.
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Adding new CLI to display pim channel informations.
Changing DEFUN to DEPFY for ""show ip pim channel"
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>