Commit Graph

2572 Commits

Author SHA1 Message Date
Mobashshera Rasool
a626be65c5 pimd: Remove unused extern pim_channel_oil_list
Removing the extern declaration of pim_channel_oil_list since
its not required anymore.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-05 02:25:03 -07:00
Sarita Patra
891b1d8fb7 pim6d: fix no ipv6 pim drpriority
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-03 23:07:23 -07:00
Sarita Patra
596b5a8a4c pim6d: configure ipv6 pim drpriority
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-03 23:05:23 -07:00
Donatas Abraitis
1db8b179e4
Merge pull request #11505 from SaiGomathiN/watermark
pim6d: Fix the todo items in ipv6 watermark limit CLI
2022-07-02 21:36:42 +03:00
Sai Gomathi N
fc19632faa pimd, pim6d: Adding json support for show ipv6 nexthop
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-30 04:09:14 -07:00
nsaigomathi
573a01ba19 pimd: json support for nexthop
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>
2022-06-30 03:22:19 -07:00
Sai Gomathi N
889d43b1e6 pim6d: Implementing mld watermark-warn CLI completely
Implementing the TBD of watermark-warn CLI for IPv6 MLD
This command can be use to warn the user
when more than the desired limit of groups gets configured.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-06-30 02:05:13 -07:00
Sai Gomathi N
229a20e2ad pimd: Modifying member of pim_instance to accomodate IPv6 changes
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>
2022-06-30 01:49:54 -07:00
Donald Sharp
03c95c540f
Merge pull request #11493 from patrasar/pim_reg_stop_fix
pimd: Register stop message sent with mask 32
2022-06-29 13:02:27 -04:00
Sarita Patra
8e51ca271e pimd: Register stop message sent with mask 32
As per RFC 4601 section 4.9.4, For Register-Stops,
the Mask Len field contains full address length * 8
(e.g. 32 for IPv4 native encoding) (e.g. 128 for IPv6),
if the message is sent for a single group

The issue is seen after 10356, so fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-06-29 06:34:19 -07:00
Donatas Abraitis
fd878267a3
Merge pull request #11428 from SaiGomathiN/pimdebug
pimd,pim6d: Change the show running commands based on address family
2022-06-29 14:27:45 +03:00
Mobashshera Rasool
8d9e46a727 pimd: Querier to non-querier transition to be ignored
Fixing IGMPv2 ANVL Conformance issue 3.10

As per RFC 2236 section 3, when the leave message is received at a querier,
it starts sending Query messages for "last Member Query Interval*query count"
During this time there should not be any querier to non-querier
transition and the same router needs to send the remaning queries.

Currently the code is handling this scenario only when leave is receive
for a group and the query is received for the same group.
But we need to handle it irrespective of group since the querier
election is based on interface and not group.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-28 05:07:27 -07:00
Abhishek N R
4fecac21cb pim6d: Changing igmp_enable to gm_enable.
Modified variable name so that it can be reused in mld.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-27 05:52:02 -07:00
Sai Gomathi N
68a7caf4bf pimd,pim6d: Change the show running commands based on address family
Change the show running commands for pimv4 and pimv6 debug commands
based on the address family.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-06-26 23:42:47 -07:00
Donald Sharp
9a18e71314
Merge pull request #11475 from patrasar/pim_if_delete
pimd: fix pim interface deletion flow
2022-06-24 14:49:55 -04:00
Donald Sharp
348d4d7545
Merge pull request #11471 from mobash-rasool/fixes
pimd: Clean up mroute_socket when pim terminates.
2022-06-24 12:02:35 -04:00
Donald Sharp
3e905d92c4
Merge pull request #11468 from patrasar/pim_valgrind_fix
pimd: Fixing invalid memory access
2022-06-24 11:53:43 -04:00
Donald Sharp
4d3fb2bf42
Merge pull request #11242 from patrasar/pimv6_issue_11233
pim6d: Fixing repeated group source field in show ipv6 mroute
2022-06-24 10:56:48 -04:00
Sarita Patra
1925ca8f4e pimd: fix pim interface deletion flow
Deletion of pim interface(pim_if_delete) should
do the below things before cleanup.
1. Send a hello message with zero hold time.
2. Delete all the neighbors.
3. Close the pim socket.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-06-24 07:48:03 -07:00
Donald Sharp
ff97a24bc3
Merge pull request #11467 from mobash-rasool/fixes2
pimd: Avoid accessing freed memory
2022-06-24 10:05:42 -04:00
Sarita Patra
bc26d1bb61 pimd: fix invalid memory access join_timer_stop
Issue:
==16837== Invalid read of size 8
==16837==    at 0x17971C: pim_neighbor_find (pim_neighbor.c:431)
==16837==    by 0x186439: join_timer_stop (pim_upstream.c:348)
==16837==    by 0x186794: pim_upstream_del (pim_upstream.c:231)
==16837==    by 0x189A66: pim_upstream_terminate (pim_upstream.c:1951)
==16837==    by 0x17111B: pim_instance_terminate (pim_instance.c:54)
==16837==    by 0x17111B: pim_vrf_delete (pim_instance.c:172)
==16837==    by 0x4F1D6C8: vrf_delete (vrf.c:264)
==16837==    by 0x19006F: pim_terminate (pimd.c:160)
==16837==    by 0x1B2E4D: pim_sigterm (pim_signals.c:51)
==16837==    by 0x4F08FA2: frr_sigevent_process (sigevent.c:130)
==16837==    by 0x4F1A2CC: thread_fetch (thread.c:1771)
==16837==    by 0x4ED4F92: frr_run (libfrr.c:1197)
==16837==    by 0x15D81A: main (pim_main.c:176)

Root Cause:
In the pim_terminate flow, the interface is deleted
before the pim_interface clean up. Because of this,
the pim_interface is having garbage value.

Fix:
Release the pim interface memory and then delete the
interface.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-06-24 05:37:18 -07:00
Mobashshera Rasool
3b2f2aa146 pimd: Clean up mroute_socket when pim terminates.
pim_mroute_socket_disable api is present but nowhere called.
This should be called when pim instance is terminated.
Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-24 05:36:15 -07:00
mobash-rasool
8771cdcb94
Merge pull request #11462 from donaldsharp/random_stuff_right
Random stuff right
2022-06-24 17:23:31 +05:30
sarita patra
fd07e88b75 pim6d: Fixing repeated group source field in show ipv6 mroute
The command "show ip[v6] mroute" displaying group and source
field for every OIL.

Fix:
Display group and source for the first OIL only.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-06-24 04:41:51 -07:00
Donald Sharp
c315b87c4f
Merge pull request #11457 from plsaranya/pim_mroute
Pim6d: Mroute file duplication removal
2022-06-24 07:07:03 -04:00
Mobashshera Rasool
30247bd637 pimd: Avoid reading freed memory.
If the upstream is freed in pim_upstream_del, then trying to
call pim_upstream_timers_stop will lead to accessing freed memory.

Fix:
Stop the timer only if upstream is not deleted.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-24 03:50:45 -07:00
Donald Sharp
f4e8f5d496 pimd: Checks imply that pim is not properly configured
The call to gm_update_ll checks for null pointers and
implies to SA that things could not be configured correctly
This is not true with the code flow.  Remove the confusing code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-23 13:43:25 -04:00
Donald Sharp
6f55b4ae24 pimd: Let end operator know the ifindex as well in failure case
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-23 13:43:25 -04:00
Donald Sharp
75700af602 pimd: Limit pim's ecmp to what zebra tells us is the multipath
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-06-23 13:29:19 -04:00
mobash-rasool
5b9ffc923d
Merge pull request #11182 from g-balaji1/pimv6-sock-hdrincl
pim6d: Removal of IPV6_HDRINCL option
2022-06-23 22:16:47 +05:30
plsaranya
1ce957d66d Pim6d: Mroute file duplication removal
Mroute duplicate functions removed and made us hybrid for v4 and v6

Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
2022-06-23 06:59:03 -07:00
Mobashshera Rasool
4b603761c1 pim6d: Send register msg with IPv6 global address
Use global unicast IPv6 address to send the register
packet.

Fixes: #11235

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-21 20:44:10 -07:00
Donald Sharp
f3d6bfd13e
Merge pull request #11272 from AbhishekNR/flag_removal
pim6d: Removed PIM_IPV == 4 flag
2022-06-15 20:19:34 -04:00
Donald Sharp
77c98a18b9
Merge pull request #11412 from mobash-rasool/fixes
pimd: Fix the setting of oif_flags in channel oil
2022-06-15 20:17:16 -04:00
Donald Sharp
668bbbce51
Merge pull request #11355 from patrasar/pim6reg
pim6d: creating pim6reg
2022-06-15 11:29:25 -04:00
Sarita Patra
ee1c4ba977 pim6d: creating pim6reg interface for pim6d
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-06-15 06:10:47 -07:00
mobash-rasool
677106de01
Merge pull request #11404 from donaldsharp/pim_rpf_debug_improvement
pimd: Cleanup rpf lookup debug to help us figure out what is going on
2022-06-15 18:40:37 +05:30
Mobashshera Rasool
692b118698 pimd: Fix the setting of oif_flags in channel oil
When pim_upstream_inherited_olist_decide calls the api
pim_channel_add_oif, it can pass PIM_OIF_FLAG_PROTO_GM,
PIM_OIF_FLAG_PROTO_PIM and/or PIM_OIF_FLAG_PROTO_STAR.
Now a consider a case where PIM flag was already set
but STAR flag was not set and this api tries to set
both STAR + PIM and passes the same. The api pim_channel_add_oif
returns since it sees that PIM is already set without
setting the STAR flag.

So basically this will lead to issues in scenarios where for the
same OIF multiple flags(IGMP, PIM, STAR) needs to be set.

Fixing it for all combinations.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-15 00:55:55 -07:00
Donald Sharp
a1340e6de4
Merge pull request #11243 from patrasar/pimv6_issue_11240
pim6d: Don't enable mld on pimreg interface by default
2022-06-14 11:59:42 -04:00
Donald Sharp
cf568522d5 pimd: Cleanup rpf lookup debug to help us figure out what is going on
The rpf lookup debug was not taking into account the fact that a prefix-list
might be applied and also we might need to make a choice between the two.
So let's give ourselves a bit more data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-14 09:50:54 -04:00
Balaji Gurudoss
529f52252c pim6d: Removal of IPV6_HDRINCL option
1. Removal of IPV6_HDRINCL option
2. Removal of IPv6 headers in TX
3. Addition of IPV6_PKTINFO and setting of source ipv6 address for TX.

Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
2022-06-13 16:51:01 +05:30
Mobashshera Rasool
858c3dee04 pim6d: Implement show ipv6 pim interface traffic
This CLI shows the number of PIM protocol packets
sent/received on each interface.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-12 21:31:09 -07:00
Mobashshera Rasool
52770b79a8 pimd: Change to DEFPY and make the api common
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>
2022-06-12 21:24:01 -07:00
Mobashshera Rasool
36cec27cd9 pim6d: Moving show apis to common file
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>
2022-06-12 21:17:54 -07:00
Donald Sharp
db28205528
Merge pull request #11385 from AbhishekNR/show_cli
pimd, pim6d: Moving reusable code to common api for show CLI's.
2022-06-12 08:06:01 -04:00
Donald Sharp
769cdf5654
Merge pull request #11387 from SaiGomathiN/pimshow
pimd, pim6d: Moving the reusable code to common api for PIM show CLIs
2022-06-12 08:00:01 -04:00
Sai Gomathi N
94c691ba40 pim6d: Moving the reusable code of pim_show_join cli
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>
2022-06-09 22:43:52 -07:00
mobash-rasool
a6a28b5f23
Merge pull request #11372 from donaldsharp/pim_if_cmp_bug
pimd: Fix pim_channel_oil_empty tests
2022-06-09 22:45:49 +05:30
Donald Sharp
a64543e3e8 pimd: Show interface traffic even if interface is currently down
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>
2022-06-09 10:29:04 -04:00
Donald Sharp
aa0bb312b1 pimd: Fixup oil_if_has and oil_if_set to be consistent
the v4 and v6 versions were different.  Make them the same.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-09 09:37:33 -04:00
Donald Sharp
30b82c7af7 pimd: Fix pim_channel_oil_empty tests
The pim_channel_oil_empty() function was setting
the pimreg if it ever existed for NULL comparison
but of course the pimreg device is never pulled back
out again when it was needed to be when the pimreg
is not present.

Commit: a5fa982256
broke this.

Fixes: #11368
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-09 09:36:11 -04:00
Abhishek N R
789d0ec4de pim6d: Moving reusable code to common api for "show mroute summary" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 04:53:12 -07:00
Abhishek N R
1c1077c200 pim6d: Moving reusable code to common api for "show ip/ipv6 mroute count" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 04:43:28 -07:00
Abhishek N R
4f1f8ff9aa pim6d: Moving reusable code to common api for "show ip/ipv6 mroute" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 04:27:20 -07:00
Sai Gomathi N
fe7eaf4065 pim6d: Moving the common lines of pim_show_nexthop_lookup cli
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>
2022-06-09 04:22:42 -07:00
Abhishek N R
334d2f8c3d pim6d: Moving reusable code to common api for "show ip/ipv6 multicast count" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 04:04:14 -07:00
Abhishek N R
8e15c9aa06 pim6d: Moving reusable code to common api for "show ip/ipv6 multicast" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 03:51:41 -07:00
Abhishek N R
e7c01c6769 pim6d: Moving reusable code to common api for "show pim state" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 03:29:02 -07:00
Sai Gomathi N
cefa37cf41 pim6d: Moving the common lines of pim_show_nexthop cli
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>
2022-06-09 03:23:28 -07:00
Abhishek N R
c630970866 pim6d: Moving reusable code to common api for "show pim upstream rpf" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 03:10:21 -07:00
Abhishek N R
622da92f35 pim6d: Moving reusable code to common api for "show pim upstream join desired" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 02:57:49 -07:00
Abhishek N R
9aa0569d6e pim6d: Moving reusable code to common api for "show pim upstream" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 02:40:21 -07:00
Sai Gomathi N
78b0e69073 pim6d: Moving the common lines of pim_show_neighbors_vrf_all cli
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>
2022-06-09 02:36:08 -07:00
Abhishek N R
19296b58e4 pim6d: Moving reusable code to common api for "show pim statistics" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 01:59:58 -07:00
Sai Gomathi N
154aa4fcd4 pim6d: Moving the common lines of pim_show_neighbors cli
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>
2022-06-09 01:34:06 -07:00
Abhishek N R
5e52c8d5c8 pim6d: Moving reusable code to common api for "show pim secondary" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 01:33:01 -07:00
Abhishek N R
e21c4e9075 pim6d: Moving resuable code to common api for "show pim rp-info" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-09 00:49:38 -07:00
Sai Gomathi N
bec5bdbe7f pim6d: Moving the common lines of pim_local_membership cli
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>
2022-06-09 00:34:33 -07:00
Sai Gomathi N
3ca4082343 pim6d: Moving the common lines of pim_show_jp_agg cli
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>
2022-06-09 00:34:24 -07:00
Sai Gomathi N
342ba5f3bd pim6d: Moving the common lines of pim_show_interface_vrf_all cli
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>
2022-06-08 23:56:17 -07:00
Sai Gomathi N
8282b98838 pim6d: Moving the common lines of pim_show_interface cli
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>
2022-06-08 23:27:00 -07:00
Sai Gomathi N
b6bf33775d pim6d: Moving the common lines of pim_show_channel cli
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>
2022-06-08 23:25:51 -07:00
Abhishek N R
6d1bd8c28a pim6d: Moving resuable code to common api for "show pim rpf" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-08 22:49:16 -07:00
Donald Sharp
e0220703d1 pimd: pim_addr_cmp returns 0 for same not -1 or 1
The test for setting pimDesignatedRouterLocal was comparing
the result of pim_addr_cmp to non zero to say that the
pim_dr_addr and primary_address are the same.  This is
not correct in that pim_addr_cmp returns 0 for being the
same, so the correct test is !pim_addr_cmp

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-08 11:36:48 -04:00
Sarita Patra
d8cace8772 pim6d: Introduced PIMREG macro
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-06-08 01:59:37 -07:00
Mobashshera Rasool
e502ecad11 pimd: Handle receive of (*,G) register stop with src addr as 0
PIM conformance test case 11.12 sends a register stop msg with
source address as 0. This should trigger a register stop for
all the upstreams. It is not happening as such because we are not
considering 0.0.0.0 source address for starg_handling.

Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-07 05:53:46 -07:00
Russ White
0f4d109b51
Merge pull request #11277 from donaldsharp/pim_prefix_list_bug
pimd: Allow the LPM match work properly with prefix lists and normal …
2022-05-26 17:47:21 -04:00
Donald Sharp
94dc0c4ed4 pimd: Allow the LPM match work properly with prefix lists and normal rp's
All rp_info's are being saved in the pim->rp_list and the non prefix-list
rp's are supposed to be saved in table pim->rp_table.  What was happening,
though, is that all the plists were being stored at the 224.0.0.0/4 node
of the tree(irrelevant to the fact that we should not be looking up the
non-prefix list rp's in the table) and since we can have multiple prefix lists
and only one rp_info stored at the 224.0.0.0/4 node of the tree, there can be situations
where the 224.0.0.0/4 node can be overwritten due to the order entered.

As such there exists situations where command enter ordering will cause
what we match to, change in pim_rp_find_match_group.

Fixes:

a) Do not store prefix list based rp_info's in the pim->rp_table
b) In pim_rp_find_match_group, ensure that the node lookup does
not correspond to a prefix list based node.
c) When in the situation there are both:
ip pim rp 4.5.6.7 224.0.0.0/16
ip pim rp 5.6.67.8 prefix-list FOO
ip prefix-list FOO permit 224.0.1.0/24
and we receive a group for 224.0.1.5, we were comparing the
224.0.0.0/16 to the 224.0.0.0/4 of the 5.6.67.8 group, when
FRR should have been comparing to entry that matched in the prefix-list

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-26 10:45:35 -04:00
Donald Sharp
c7c5d685c0 pimd: Disable handling v3 igmp packets on an interface config'ed for v2
pimd is receiving v3 igmp packets on an interface that is setup as v2 and
causing the igmp group as configured on that interface to get a bit
wonky.

Add a check to receiving v3 packets and to drop the packet if the
igmp version configed on the interface is 2.

Fixes: #11105
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-25 20:05:49 -04:00
Abhishek N R
ce5c686bb9 pim6d: Removed PIM_IPV == 4 flag
PIM_IPV == 4 is removed form function pim_cmd_show_ip_multicast_helper
as pim_zlookup.c is available for pimv6 aswell.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-05-24 22:51:10 -07:00
sarita patra
2ea34a81df pim6d: Don't enable mld on pimreg interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-23 01:24:30 -07:00
David Lamparter
cbbb1813a6
Merge pull request #11008 from patrasar/sec_addr_list_pimv6 2022-05-20 15:25:52 +02:00
Sai Gomathi N
89f86fe2cc pim6d: Adding 'debug node' initialization
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-18 03:31:33 -07:00
Sai Gomathi N
fa5138d676 pim6d: Add 'debug pimv6 zebra'
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>
2022-05-18 03:31:33 -07:00
Sai Gomathi N
904dbf5310 pim6d: Add 'debug pimv6 trace' and 'debug pimv6 trace detail'
Implementing debugs pimv6 trace and trace detail for tracing pim code
and how it is running.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-18 03:31:33 -07:00
Sai Gomathi N
d05746d48d pim6d: Add 'debug_pimv6_packetdump_send_cmd' and 'debug_pimv6_packetdump_recv_cmd'
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>
2022-05-18 03:31:33 -07:00
Sai Gomathi N
60940ee264 pim6d: Add 'debug pimv6 packets'
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>
2022-05-18 03:31:33 -07:00
Sai Gomathi N
c51c7de263 pim6d: Add 'debug pimv6 events'
Implementing debug pimv6 events command for debugging PIMv6 system events.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-18 03:31:33 -07:00
Sai Gomathi N
dcfd5abed7 pim6d: Add 'debug pimv6 nht' and 'debug pimv6 nht detial'
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>
2022-05-18 03:31:21 -07:00
Sai Gomathi N
bf385e2653 pim6d: Add 'debug pimv6'
Implementing debug pimv6 command for PIMv6 protocol activity.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-17 21:43:13 -07:00
David Lamparter
44937c5450
Merge pull request #11037 from SaiGomathiN/clearcli 2022-05-17 15:00:32 +02:00
Donald Sharp
8a8ad459af
Merge pull request #10775 from opensourcerouting/pim6-mld-pr
pim6d: MLD code
2022-05-17 07:20:08 -04:00
Sai Gomathi N
4e65109c7f pim6d: Add 'clear ipv6 mroute [vrf NAME] count' CLI
Adding clear ipv6 mroute count command for resetting
multicast routes and count.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-17 00:05:19 -07:00
Sai Gomathi N
09a754ead1 pim6d: Add 'clear ipv6 pim [vrf NAME] oil' command
Adding clear ipv6 pim [vrf NAME] oil CLI for resetting
PIMv6 output interface list.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-17 00:05:19 -07:00
Sai Gomathi N
a14ae31412 pim6d: Add 'clear ipv6 mroute [vrf NAME]' command
Adding clear ipv6 mroute cli for resetting the PIMv6 mroutes.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-16 22:47:05 -07:00
Sai Gomathi N
ef1b0a2d8c pim6d: Adding 'clear ipv6 pim statistics [vrf NAME]' cmd
Adding clear ipv6 pim statistics cli for resetting pimv6 statistics

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-16 22:47:05 -07:00
Sai Gomathi N
fe0c6838c5 pim6d: Adding pim_cmd_lookup api in pim_cmd_common file
Adding pim_cmd_lookup function for clear CLIs

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-16 22:47:04 -07:00
Sai Gomathi N
58d5712048 pimd: Moving the common functions from pim_cmd.c file
Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-05-16 22:47:04 -07:00
Jafar Al-Gharaibeh
a17ced5243
Merge pull request #10958 from patrasar/pim_passive
pimd: introduce ip pim passive command
2022-05-13 08:39:12 -05:00
sarita patra
9726536d1d pimd: Northbound support for pim passive enable
Added nothbound callbacks for pim-passive-enable

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
fd3eb43d76 pimd: Disable receiving BSM on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
c473c7452a pimd: Disable receiving assert msg on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
b9695c6d04 pimd: Disable receiving join/prune on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
1e8f260cd4 pimd: Disable receiving register-stop on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
b4afc283e9 pimd: Disable receiving register msg on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
39c2130e82 pimd: Disable receiving hello on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
11e771be61 pimd: Handling hello send statistics for passive interface
Increment pim_ifstat_hello_sent only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
6dd493b80b pimd: Handling reg and reg_stop send statistics for passive interface
Increment pim_ifstat_reg_stop_send & pim_ifstat_reg_send when
interface is passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
2287056228 pimd: Handling Join/Prune statistics for passive interface
Increment pim_ifstat_prune_send only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
ac5c9346b7 pimd: Handling BSM send statistics for passive interface
Increment pim_ifstat_bsm_tx only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
51660af8ff pimd: Handling assert send statistics for passive interface
Increment pim_ifstat_assert_send only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
7be33c5b4a pimd: display passive in show ip pim interface cmd
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
2a66cf6309 pimd: show ip[v6] pim passive in show running config
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
03c106bf30 pimd: Disable sending of control packets on passive interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
78039cb25d pimd: introduced flags for pim_passive_enable
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
sarita patra
51491fdc13 pim6d: introduce ipv6 pim passive command
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>
2022-05-12 23:51:21 -07:00
sarita patra
d017bf3cb0 pimd: introduce ip pim passive command
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>
2022-05-12 23:50:06 -07:00
Donatas Abraitis
6006b807b1 *: Properly use memset() when zeroing
Wrong: memset(&a, 0, sizeof(struct ...));
    Good:  memset(&a, 0, sizeof(a));

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-11 14:08:47 +03:00
David Lamparter
df655593a2 pim6d: change MLD socket to be per VRF
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:02:02 +02:00
David Lamparter
d2951219a1 pim6d: add some show commands for MLD
Just some basic show commands to get going.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:02:02 +02:00
David Lamparter
5afe22f5bc pim6d: show MLD in running-config
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:02:02 +02:00
David Lamparter
aa2f934929 pim6d: count stats for MLD
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:02:02 +02:00
David Lamparter
5e5034b0a2 pim6d: add fresh MLD implementation
Fresh ground-up MLD implementation with subscriber-tracking for MLDv2.
Intended to be adapted for IPv4 and replace the IGMP implementation at a
later point.

Tested in ANVL, currently at 94/116.  Some issues/TODOs are left in the
code as CPP_NOTICE markers, but the code is very much good enough to
proceed since otherwise we're blocked on overall PIM v6 progress.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:01:59 +02:00
David Lamparter
993e3d8e13 pimd: un-dependency-hell pim_instance.h
This is causing build issues on BSD by including (transitively)
`linux/mroute6.h` - try to address by disentangling the headers a bunch.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 15:10:57 +02:00
David Lamparter
1b00ed5f65 pimd: pass down length for register messages
The IPv6 `mrt6msg` kernel pseudo-header does not have a length field;
accessing what would be the IPv6 payload length reads zeroes.

Pass down the proper length and use that instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 12:42:29 +02:00
Donatas Abraitis
50f1f2e724
Merge pull request #11059 from anlancs/fix/bgpd-evnp-wrong-check-hashget
bgpd: fix memory leak for evpn
2022-05-04 21:19:51 +03:00
Rafael Zalamena
8bc5979049
Merge pull request #11142 from patrasar/pim_register_show_fix
pimd: fixing wrong diplay registerTx
2022-05-03 17:01:30 -03:00
sarita patra
007784ccff pimd: fixing wrong diplay registerTx
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-03 08:53:47 -07:00
Donald Sharp
53f60d5d5b
Merge pull request #11113 from opensourcerouting/pim6-icmp6-replace-bpf
pim6d: use ICMP6_FILTER instead of BPF on mroute
2022-05-02 13:19:47 -04:00
anlan_cs
8e3aae66ce *: remove the checking returned value for hash_get()
Firstly, *keep no change* for `hash_get()` with NULL
`alloc_func`.

Only focus on cases with non-NULL `alloc_func` of
`hash_get()`.

Since `hash_get()` with non-NULL `alloc_func` parameter
shall not fail, just ignore the returned value of it.
The returned value must not be NULL.
So in this case, remove the unnecessary checking NULL
or not for the returned value and add `void` in front
of it.

Importantly, also *keep no change* for the two cases with
non-NULL `alloc_func` -
1) Use `assert(<returned_data> == <searching_data>)` to
   ensure it is a created node, not a found node.
   Refer to `isis_vertex_queue_insert()` of isisd, there
   are many examples of this case in isid.
2) Use `<returned_data> != <searching_data>` to judge it
   is a found node, then free <searching_data>.
   Refer to `aspath_intern()` of bgpd, there are many
   examples of this case in bgpd.

Here, <returned_data> is the returned value from `hash_get()`,
and <searching_data> is the data, which is to be put into
hash table.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-03 00:41:48 +08:00
mobash-rasool
de416e6782
Merge pull request #10742 from plsaranya/pim_register
pim6d: Register message send handling
2022-05-02 13:16:03 +05:30
David Lamparter
46a3bfa695
Merge pull request #10988 from AbhishekNR/ipv6_mroute_cli 2022-04-29 10:23:37 +02:00
mobash-rasool
c4aa8aa669
Merge pull request #11114 from opensourcerouting/vrf-declvar-macros
lib, zebra, pimd: clean up/fix VRF DECLVAR macros
2022-04-29 13:53:08 +05:30
plsaranya
30b277e158 pim6d: Register message send handling
Register and Null register send handling
In IPv6 PIM Null Register message if dummy PIM Header is included as
data, this dummy PIM header checksum needs to be valuated

Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
2022-04-29 11:05:57 +05:30
sarita patra
53749ba70b pimd: Print secondary address using %pFX
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-28 03:28:17 -07:00
sarita patra
d58395d1f3 pim6d: Adjust IPV6 secondary address list
Within one Address List Hello option, all the addresses MUST be of
the same address family.  It is not permitted to mix IPv4 and IPv6
addresses within the same message.  In addition, the address family
of the fields in the message SHOULD be the same as the IP source and
destination addresses of the packet header.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-28 03:27:42 -07:00
Mobashshera Rasool
0696c2ff20 pim6d: Make pim_zlookup_sg_statistics available for v6
Since pim_zlookup.c is available for pimv6,
Call pim_zlookup_sg_statistics api for v6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-28 02:40:56 -07:00
Abhishek N R
74e8197b33 pim6d: Implementing "show ipv6 mroute summary" CLI
Adding new show CLI to display ipv6 mroute summary information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:14:49 -07:00
Abhishek N R
c41a9dcfa2 pim6d: Implementing "show ipv6 mroute count" CLI
Adding new show CLI to display ipv6 mroute count information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:14:49 -07:00
Abhishek N R
50ba39bf4c pim6d: Implementing "show ipv6 mroute" CLI
Adding new show CLI to display ipv6 mroute information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:14:48 -07:00
David Lamparter
0cbed9511a lib, zebra, pimd: clean up/fix VRF DECLVAR macros
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>
2022-04-28 11:09:26 +02:00
David Lamparter
fef295d439 pim6d: use ICMP6_FILTER instead of BPF on mroute
The ICMP6_FILTER option is always checked by the kernel, so the cost is
taken whether or not anything is set there.  Use it instead of taking on
additional cost with a BPF program.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-28 10:46:57 +02:00
Abhishek N R
3b767e4b6d pimd: Moving the common functions from pim_cmd.c
Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 01:43:19 -07:00
Mobashshera Rasool
51f4fd9810 zebra, pimd: Add a field family in the message ZEBRA_IPMR_ROUTE_STATS
1. Adding a field family in the existing ZEBRA_IPMR_ROUTE_STATS
to get the ipv4 as well as ipv6 trafic stats between pim and zebra.
2. Modify the debug to print both v4/v6 prefixes

pimd: pim6d: Modify pim_zlookup_sg_statistics to get ipv6 stats

Modify the pim_zlookup_sg_statistics api to
get ipv4/ipv6 stats from zebra. Making the api
common.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-28 01:10:49 -07:00
David Lamparter
633a50d11c
Merge pull request #11031 from AbhishekNR/v6_multicast 2022-04-28 10:06:00 +02:00
Donald Sharp
b6f754f89d
Merge pull request #11098 from opensourcerouting/zapi-mrib-v6
zebra, pimd: add IPv6 support to NEXTHOP_LOOKUP_MRIB
2022-04-27 09:27:49 -04:00
Abhishek N R
3e55b3b5fd pim6d: Implementing "show ipv6 multicast count" CLI
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-27 04:26:35 -07:00
Abhishek N R
ca3b5906fc pim6d: Implementing "show ipv6 multicast" CLI
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-27 04:25:51 -07:00
mobash-rasool
27562f3815
Merge pull request #11088 from opensourcerouting/pim-debug-snafus
pimd: fix SNAFUs in debug flags
2022-04-26 21:05:50 +05:30
David Lamparter
6f4ce28aa5 pimd: clean up zlookup nexthop handling
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 16:15:00 +02:00
David Lamparter
dea337dc57 pim6d: implement/un-stub MRIB lookup
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 16:15:00 +02:00
David Lamparter
34ee41c6c9 zebra, pimd: add AF param on NEXTHOP_LOOKUP_MRIB
By changing this API call to use a `struct ipaddr`, which encodes the
type of IP address with it.  (And rename/remove the `IPV4` from the
command name.)

Also add a comment explaining that this function call is going to be
obsolete in the long run since pimd needs to move to proper MRIB NHT.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 16:15:00 +02:00
Abhishek N R
be126d919a pimd: Moving the common functions from pim_cmd.c
Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-26 07:02:58 -07:00
David Lamparter
d1b7dfbe08
Merge pull request #10712 from patrasar/pim_nexthop_prefix_to_pimaddr 2022-04-26 15:39:36 +02:00
David Lamparter
e9c59240f6 pimd: add missing debug igmp trace detail
The flag was defined but there was no command to actually enable it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 10:49:03 +02:00
David Lamparter
92fed03c3d pimd: fix reversed logic for "debug ... detail"
The normal flag was enabling detail messages, but what we want is the
detail flag enabling normal messages.

Remove the _ONLY macro while at it, it's only used for config print &
that seems like a place where making the difference explicitly visible
is helpful regardless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 10:49:03 +02:00
Sai Gomathi N
fb0054120d pim6d: Modifying the mld group watermark command name
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>
2022-04-24 23:44:27 -07:00
Sai Gomathi N
22532615b1 pim6d: Removing duplicate PIM_DECLVAR_CONTEXT macro
Removing the duplicate PIM_DECLVAR_CONTEXT from
pim_common_cmd.h file.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-04-24 23:44:27 -07:00
Mobashshera Rasool
14c7ac504f pimd: Set new to true in igmp_get_source_by_addr api
5421bf8 commit forgot to set the parameter "new" to true
when a new source is created, have fixed it.

igmp_get_source_by_addr api is currently setting the parameter
"new" to false always. This is not right. The caller apis are using
this field to decide and based on that take actions to create timers, etc.

Its need to be set to true when a new source is created.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-21 05:54:40 -07:00
Donald Sharp
dc7be57dfc
Merge pull request #10853 from plsaranya/pim_assert_fixes
pimd: assert fixes
2022-04-20 07:57:40 -04:00
Donald Sharp
831a15d3e3
Merge pull request #11023 from AbhishekNR/igmp_flag
pimd: Changing PIM_OIF_FLAG_PROTO_IGMP to PIM_OIF_FLAG_PROTO_GM
2022-04-20 07:43:09 -04:00
Donald Sharp
f526739897 *: Fix spelling of accomodate
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:29:58 -04:00
Donald Sharp
2ef62909a9 *: Fix spelling of atleast
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:25:03 -04:00
Donald Sharp
3819e4ced7 *: Fix spelling of inteface
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:21:31 -04:00
Donald Sharp
b97047ed11 *: Fix spelling of non-existant
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:16:45 -04:00
Mobashshera Rasool
3d4c335568 pim6d: Correct the spelling of Rendezvous
Rendevous --> Rendezvous
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-18 23:17:43 -07:00
Mobashshera Rasool
a6324d6a30 pimd: Correct the spelling of Rendezvous
Rendevous --> Rendezvous
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-18 23:17:43 -07:00
mobash-rasool
4e3ccd396c
Merge pull request #10931 from g-balaji1/pimv6-ssm-cmds
pim6d: Addition of ipv6 ssmpingd config commands
2022-04-13 15:50:31 +05:30
Abhishek N R
80a82b567f pimd: Changing PIM_OIF_FLAG_PROTO_IGMP to PIM_OIF_FLAG_PROTO_GM
Modified marco name so that it can be reused in mld.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-13 01:19:03 -07:00
mobash-rasool
8e53f35b5f
Merge pull request #10989 from opensourcerouting/pim-options-remove
pimd: remove pim_interface->options
2022-04-12 21:10:44 +05:30
Balaji Gurudoss
a8caf78d61 pim6d: Addition of ipv6 ssmpingd config commands
Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
2022-04-12 18:07:24 +05:30
Mobashshera Rasool
e1f87dce0f pimd: correct the show ip igmp sources output
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>
2022-04-11 00:17:11 -07:00
David Lamparter
4f977c8e77 pimd: remove pim_interface->options
I should've removed this in #10960.  It's a hazard in terms of
forgetting to adjust PRs/other changes that might accidentally still
reference the field.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-08 10:30:24 +02:00
David Lamparter
95793341ab pimd: use SSM check helper
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-07 14:00:40 +02:00
David Lamparter
eeec411244 lib, pimd: add a bunch of address helpers
Just simple helpers to get a scope value, never-forward, and is-SSM for
a given address.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-07 14:00:36 +02:00
sarita patra
eed4433df4 pim6d: Handle mrib_nexthop_addr zclient_lookup_nexthop
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:56:31 -07:00
sarita patra
265dec6ab8 pim6d: Adjust IPV6 zclient_lookup_read_pipe
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:51:20 -07:00
sarita patra
ebbecd2106 pim6d: Adjust IPV6 zclient_lookup_nexthop_once
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:49:58 -07:00
sarita patra
eed74896d4 pim6d: Adjust IPV6 zclient_read_nexthop
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:48:13 -07:00
sarita patra
dac86a0a2d pim6d: Handle mrib_nexthop_addr & pim_zlookup_nexthop in pim_nht
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
cbe1dbba30 pim6d: modify nexthop_addr to pim_addr in pim_zlookup_nexthop
Currently pim_zlookup_nexthop is of type struct prefix, but it's always
a /32 host prefix. So changing it to pim_addr in order to support both
IPV4 and IPV6.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
641ac7c7d3 pim6d: Display mrib_nexthop_addr with %pPA
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
d8a2f46667 pim6d: Handle mrib_nexthop_addr in pim_upstream
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
7b94245256 pim6d: Adjust mrib_nexthop_addr igmp_mtrace code
In this PR, we are handling the igmp_mtrace code
after mrib_nexthop_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:12 -07:00
sarita patra
0332b088d3 pim6d: Adjust mrib_nexthop_addr msdp code
In this PR, we are handling the msdp code
after mrib_nexthop_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:36:42 -07:00
sarita patra
34a466b78c pim6d: Adjust mrib_nexthop_addr rpf code
In this PR, we are handling the pim_rpf code
after mrib_nexthop_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:35:12 -07:00
sarita patra
a1bc5746a9 pim6d: modify mrib_nexthop_addr from prefix to pim_addr
Currently mrib_nexthop_addr is of type struct prefix, but it's always
a /32 host prefix. So changing it to pim_addr in order to support both
IPV4 and IPV6.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:34:38 -07:00
Mobashshera Rasool
969e751921 pimd: Remove pim_channel_oil_change_iif from header file
pim_channel_oil_change_iif is sitting idly in .h file with no
definition.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-05 21:54:01 -07:00
mobash-rasool
25ddb686ca
Merge pull request #10965 from opensourcerouting/fix/pim_igmp_group_delete
pimd: Replace ALL_LIST_ELEMENTS_RO to ALL_LIST_ELEMENTS group_list it…
2022-04-06 04:07:30 +05:30
David Lamparter
8996a815b5
Merge pull request #10365 from SaiGomathiN/ipv6-config-cmd 2022-04-05 21:07:15 +02:00
Donald Sharp
0e3aad23de
Merge pull request #10940 from opensourcerouting/pim-5549-clarify
pimd: clarify RFC5549 nexthop handling (& fix for pim6d)
2022-04-05 09:43:39 -04:00
Donald Sharp
95e6a352d8
Merge pull request #10959 from patrasar/pim_coverity
pimd: Fixing pim coverity issues
2022-04-05 09:38:42 -04:00
mobash-rasool
37cfc612fc
Merge pull request #10960 from opensourcerouting/pim-unmacro-1
pimd: remove useless PIM_IF_* macros
2022-04-05 15:17:25 +05:30
Donatas Abraitis
5c13cb9dc5 pimd: Replace ALL_LIST_ELEMENTS_RO to ALL_LIST_ELEMENTS group_list iteration
To reproduce:
```
ip pim ssm prefix-list pim-ssm-group
ip prefix-list pim-ssm-group seq 10 permit 238.4.0.0/16 ge 32 le 32
```

Assert:
```
pimd[645545]: pimd/pim_igmp.c:148: igmp_source_forward_reevaluate_all(): assertion ((srcnode)->data != NULL) failed
PIM[645545]: Received signal 6 at 1649140750 (si_addr 0x6e0009d9a9, PC 0x7fe5e3f95ce1); aborting...
PIM[645545]: /usr/local/lib/libfrr.so.0(zlog_backtrace_sigsafe+0x5e) [0x7fe5e41f2d7e]
PIM[645545]: /usr/local/lib/libfrr.so.0(zlog_signal+0xe6) [0x7fe5e41f2f56]
PIM[645545]: /usr/local/lib/libfrr.so.0(+0xc9412) [0x7fe5e421d412]
PIM[645545]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7fe5e4133140]
PIM[645545]: /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x141) [0x7fe5e3f95ce1]
PIM[645545]: /lib/x86_64-linux-gnu/libc.so.6(abort+0x123) [0x7fe5e3f7f537]
PIM[645545]: /usr/local/lib/libfrr.so.0(_zlog_assert_failed+0xd7) [0x7fe5e4246c37]
PIM[645545]: /usr/lib/frr/pimd(igmp_source_forward_reevaluate_all+0x230) [0x5638c65e3d90]
PIM[645545]: /usr/lib/frr/pimd(pim_prefix_list_update+0x53) [0x5638c65cbbf3]
PIM[645545]: /usr/local/lib/libfrr.so.0(prefix_list_entry_update_start+0x82) [0x7fe5e420a0a2]
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-05 10:48:56 +03:00
Sai Gomathi N
1881b5c0ca pim6d: Adding ipv6 mld watermark-warn CLI
Adding the config mode command

ipv6 mld watermark-warn <1-65535>
This command can be use to warn the user
when more than the desired limit of groups gets configured.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-04-05 00:00:10 -07:00
Sai Gomathi N
25e1db4246 pimd: Moving the common function from pim_cmd.h file
Moving the PIM_DECLVAR_CONTEXT function to the
common file pim_cmd_common.h file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-04-05 00:00:10 -07:00
Sai Gomathi N
e7ec758dff pim6d: Adding "ipv6 mld last-member-query-interval" CLI
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>
2022-04-05 00:00:10 -07:00
Sai Gomathi N
c889adcb26 pim6d: Adding ipv6 mld last-member-query-count CLI
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>
2022-04-05 00:00:10 -07:00
Sai Gomathi N
c8b3d45de2 pim6d: Adding "ipv6 mld query-max-response-time" CLI
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>
2022-04-05 00:00:01 -07:00
Jafar Al-Gharaibeh
eeeed628a3
Merge pull request #10946 from donaldsharp/pim_fhr_lhr_same_pimreg
pimd: Send immediate join( with possible SG RPT prune bit set
2022-04-04 14:00:49 -05:00