Commit Graph

667 Commits

Author SHA1 Message Date
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
Sai Gomathi N
9d6d027011 pim6d: Adding show ipv6 pim nexthop and nexthop-lookup commands
Adding new show commands to display pim nexthops and
pim nexthop lookups received from zebra.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-04-04 00:52:03 -07:00
Sai Gomathi N
1295dbebe8 pim6d: Adding "show ipv6 [vrf|vrf ALL] pim neighbor" command
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>
2022-04-04 00:52:03 -07:00
Sai Gomathi N
de11054ed0 pim6d: Adding "show ipv6 pim local-membership"
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>
2022-04-04 00:52:03 -07:00
Sai Gomathi N
24de75a254 pim6d: Adding "show ipv6 pim [vrf|vrf all] join" command
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>
2022-04-04 00:52:02 -07:00
Sai Gomathi N
44f99d2232 pim6d: Adding "show ipv6 pim [vrf|vrf all] interface" command
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>
2022-04-04 00:52:02 -07:00
Sai Gomathi N
bf083b3a66 pim6d: Adding "show ipv6 pim channel" command
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>
2022-04-04 00:52:02 -07:00
Sai Gomathi N
e2b601e8e1 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-04-04 00:52:02 -07:00
Abhishek N R
2d85c67144 pim6d: Implementing "show ipv6 pim state" CLI
Adding new show CLI to display pim internal state related to groups.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
b1a419baef pim6d: Implementing "show ipv6 pim upstream-rpf" CLI.
Adding new show CLI to display pim RPF for upstreams.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
e577f6e7d5 pim6d: Implementing "show ipv6 pim upstream-join-desired" CLI
Adding new show CLI to display group join desired status.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
95023bd72a pim6d: Implementing "show ipv6 pim upstream" CLI
Adding new show CLI to display pim upstream information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
4f58b6aaa4 pim6d: Implementing "show ipv6 pim statistics" CLI
Adding new show CLI to display pim statistics.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
626dab7f3f pim6d: Implementing "show ipv6 pim secondary" CLI
Adding new show CLI to display pim secondary addresses.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
1aa8de4687 pim6d: Implementing "show ipv6 pim rpf" CLI
Adding new show CLI to display pim RPF information.

Also corrected ipv4 json object.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:24 -07:00
Abhishek N R
45e26aa0b2 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-03-28 23:53:24 -07:00
Abhishek N R
0095f482ca pim6d: Implementing "show ipv6 pim rp-info" CLI
Adding new show CLI to display pim RP information.

Also corrected ipv4 json object.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-28 23:53:15 -07:00
Donatas Abraitis
13cd4ff4e1
Merge pull request #10815 from pguibert6WIND/pim_debug_vxlan
pimd: add 'debug pim vxlan' when 'debug pim' is used
2022-03-21 15:47:49 +02:00
Donatas Abraitis
374eefb18b
Merge pull request #10832 from patrasar/2520720
pimd: add source and group information in mroute json
2022-03-21 13:38:14 +02:00
sarita patra
f37cbaea86 pimd: source/group information now added for pruned entry
show ip mroute json command displays the source, group info
per oil, so for pruned group since the OIL is empty, it is not
showing.

Fix: Added the above information per source.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-20 23:43:55 -07:00
Donatas Abraitis
2efc3acd9e
Merge pull request #9476 from SaiGomathiN/pim-nht
pimd: Added new option "detail" in the "debug pim nht" CLI
2022-03-20 23:14:08 +02:00
Philippe Guibert
dedcdb892b pimd: add 'debug pim vxlan' when 'debug pim' is used
Reversely, negating 'debug pim' will disable vxlan debugging.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-03-17 14:36:41 +01:00
Donatas Abraitis
7d0bc72987 pimd: Include pruneTx/pruneRx for show ip pim interface traffic WORD json
```
exit1-debian-11# sh ip pim interface traffic eth2 json
{
  "eth2":{
    "name":"eth2",
    "state":"up",
    "address":"192.168.10.123",
    "index":4,
    "flagMulticast":true,
    "flagBroadcast":true,
    "lanDelayEnabled":true,
    "helloRx":2,
    "helloTx":2,
    "joinRx":0,
    "joinTx":1,
    "pruneRx":0,
    "pruneTx":0,
    "registerRx":0,
    "registerTx":0,
    "registerStopRx":0,
    "registerStopTx":0,
    "assertRx":0,
    "assertTx":0,
    "bsmRx":0,
    "bsmTx":0
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-17 10:00:02 +02:00
Donald Sharp
ed03d4d03b
Merge pull request #10791 from opensourcerouting/feature/igmp_stats_total_received_message
pimd: Add additional IGMP stats (peak number of groups)
2022-03-15 15:14:37 -04:00
Donatas Abraitis
42982834d4 pimd: Return empty JSON if we query non existing interface for IGMP stats
Now we return all zeroed stats, which seems wrong. Handle the same way, as
with PIM interfaces. Return empty JSON and a warning for VTYSH.

```
exit1-debian-11# sh ip igmp statistics interface belekas
% No such interface
exit1-debian-11# sh ip igmp statistics interface belekas json
{
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-15 17:08:35 +02:00
Donatas Abraitis
3e5d8665f6 pimd: Add additional IGMP stats (peak number of groups)
```
exit1-debian-11# sh ip igmp statistics interface eth2
IGMP statistics
Interface            : eth2
V1 query             : 0
V2 query             : 0
V3 query             : 25
V2 leave             : 0
V1 report            : 0
V2 report            : 0
V3 report            : 34
mtrace response      : 0
mtrace request       : 0
unsupported          : 0
joins failed         : 0
joins sent           : 13
general queries sent : 2
group queries sent   : 24
peak groups          : 9
total groups         : 4
total source groups  : 1
exit1-debian-11# sh ip igmp statistics interface eth2 json
{
  "eth2":{
    "name":"eth2",
    "queryV1":0,
    "queryV2":0,
    "queryV3":25,
    "leaveV2":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":34,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "peakGroups":9,
    "totalGroups":4,
    "totalSourceGroups":1,
    "joinsFailed":0,
    "joinsSent":13,
    "generalQueriesSent":2,
    "groupQueriesSent":24
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-15 14:08:35 +02:00
Donatas Abraitis
ca3e7807f6 pimd: Show total received messages IGMP stats
```
exit1-debian-11# do sh ip igmp statistics
IGMP statistics
Interface               : global
V1 query                : 0
V2 query                : 0
V3 query                : 3
V2 leave                : 0
V1 report               : 0
V2 report               : 0
V3 report               : 18
mtrace response         : 0
mtrace request          : 0
unsupported             : 0
total received messages : 21
joins failed            : 0
joins sent              : 16
general queries sent    : 6
group queries sent      : 3
total groups            : 4
total source groups     : 1
exit1-debian-11# do sh ip igmp statistics json
{
  "global":{
    "name":"global",
    "queryV1":0,
    "queryV2":0,
    "queryV3":4,
    "leaveV2":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":18,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "totalReceivedMessage":22,
    "totalGroups":3,
    "totalSourceGroups":1,
    "joinsFailed":0,
    "joinsSent":16,
    "generalQueriesSent":6,
    "groupQueriesSent":4
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-14 22:49:23 +02:00
Donatas Abraitis
278912eabf pimd: Add additional IGMP stats (generic/group specific queries sent)
```
exit1-debian-11# sh ip igmp statistics
IGMP statistics
Interface            : global
V1 query             : 0
V2 query             : 0
V3 query             : 6
V2 leave             : 0
V1 report            : 0
V2 report            : 0
V3 report            : 14
mtrace response      : 0
mtrace request       : 0
unsupported          : 0
joins failed         : 0
joins sent           : 16
general queries sent : 6
group queries sent   : 4
total groups         : 5
total source groups  : 1
exit1-debian-11# sh ip igmp statistics json
{
  "global":{
    "name":"global",
    "queryV1":0,
    "queryV2":0,
    "queryV3":6,
    "leaveV2":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":18,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "totalGroups":5,
    "totalSourceGroups":1,
    "joinsFailed":0,
    "joinsSent":16,
    "generalQueriesSent":6,
    "groupQueriesSent":4
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-14 10:50:28 +02:00
Donald Sharp
7baebfb715
Merge pull request #10447 from ton31337/fix/json_with_whitespaces
*: Fix JSON keys with whitespaces and PascalCase
2022-03-13 18:19:33 -04:00
Donatas Abraitis
f2058cb425 pimd: Add IGMP join sent/failed statistics
```
exit1-debian-11# sh ip igmp statistics
IGMP statistics
Interface           : global
V1 query            : 0
V2 query            : 0
V3 query            : 0
V2 leave            : 0
V1 report           : 0
V2 report           : 0
V3 report           : 16
mtrace response     : 0
mtrace request      : 0
unsupported         : 0
joins failed        : 0
joins sent          : 11
total groups        : 4
total source groups : 0
exit1-debian-11# sh ip igmp statistics json
{
  "global":{
    "name":"global",
    "queryV1":0,
    "queryV2":0,
    "queryV3":0,
    "leaveV3":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":16,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "totalGroups":4,
    "totalSourceGroups":0,
    "joinsFailed":0,
    "joinsSent":11
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-13 19:31:34 +02:00
Donald Sharp
6ea4244514
Merge pull request #10399 from g-balaji1/pimv6-sock
pim6d: PIMv6 socket related changes
2022-03-13 10:03:45 -04:00
Donald Sharp
e576475723
Merge pull request #10744 from opensourcerouting/igmp-json-leave-typo
pimd: fix typo in IGMP interface statistics JSON output.
2022-03-12 16:09:58 -05:00
David Lamparter
c532e50351 pimd: drop printing IP_MULTICAST_LOOP sockopt
This isn't a system or interface setting, it's a socket behavior.  It is
both irrelevant and confusing to the user since it doesn't affect any
system behavior (but it sounds like it does).  Whether it is enabled or
not is solely relevant to how the code is designed to work.

So, remove it from output.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-12 12:55:12 +01:00
Donatas Abraitis
8c0a76808a pimd: Show group-type under show ip pim rp-info
And filter by group for PIM.

```
exit1-debian-11# show ip pim rp-info
RP address       group/prefix-list   OIF               I am RP    Source   Group-Type
192.168.10.17    238.0.0.0/24        eth2              no         Static   ASM
192.168.10.110   232.0.0.0/24        eth2              no         Static   SSM
exit1-debian-11# show ip pim rp-info 238.0.0.0/24
RP address       group/prefix-list   OIF               I am RP    Source   Group-Type
192.168.10.17    238.0.0.0/24        eth2              no         Static   ASM
exit1-debian-11# show ip pim rp-info 238.0.0.0/24 json
{
  "192.168.10.17":[
    {
      "rpAddress":"192.168.10.17",
      "outboundInterface":"eth2",
      "iAmRP":false,
      "group":"238.0.0.0/24",
      "source":"Static",
      "groupType":"ASM"
    }
  ]
}
exit1-debian-11#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-12 10:41:07 +02:00
Donatas Abraitis
1e02f2f9ab pimd: Add IGMP total groups and total source groups to statistics
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-08 19:07:57 +02:00
Mobashshera Rasool
f39f349719 pimd: Modify "ip pim rp <> prefix-list <>" command
1. Moving the processing of the above command to an api.
2. Change DEFUN to DEPFY
3. Make the api common for pimv4 and pimv6 processing.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:54:49 -08:00
Mobashshera Rasool
13ddf7cf74 pimd: Moving processing of "ip pim rp <grp>" cmd to a common api
1. Moving the processing of the command to a common api.
2. Changing the DEFUN to DEFPY.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:54:44 -08:00
David Schweizer
a533bb8cac
pimd/pim_cmd.c: fix typo in IGMP iface stats JSON
Changes correct typo in JSON output for IGMP interface statistics show
command from "leaveV3" to "leaveV2".

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2022-03-07 14:18:09 +01:00
Sai Gomathi
6d733f0dbc pimd: Added new option "detail" in the "debug pim nht" CLI
Problem Statement:
=================
PIM Logs are coming at interval of 1 minute although pim
is not enabled.

Root Cause Analysis:
====================
By default, RCPM configures the PIM debugs when router comes up
via script. The product cannot disable PIM even though it is not required.
Hence moving these logs under a new debug option which will not be
enabled by default.

Fix:
====
Added a new option "detail" in the cli:
debug pim nht detail

Co-author: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2022-03-03 22:33:20 -08:00
sarita patra
63ee25c0ba pim6d: Adding ipv6 mroute INTERFACE X:X::X:X [X:X::X:X]" cli
This cli is used to add multicast route on interface

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:45 -08:00
sarita patra
52c52d7806 pim6d: Adding "ipv6 multicast boundary oil WORD" cli
This cli is used to define multicast boundary on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:45 -08:00
sarita patra
2b16b40fc7 pim6d: Adding "ipv6 pim sm" cli
This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:44 -08:00
sarita patra
dab0ac2955 pim6d: Adding "ipv6 pim ssm" cli
This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:44 -08:00
sarita patra
7e01b641ae pim6d: Adding "[no] ipv6 pim active-active" cli
This cli used to mark the interface as active-active.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:42 -08:00
sarita patra
e6aab61395 pim6d: Adding "ipv6 pim hello (1-65535) [(1-65535)]" CLI
This cli used to configure PIMV6 hello and hold timer on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 06:26:13 -08:00
sarita patra
bb387611c6 pim6d: Adding "ipv6 pim dr-priority" CLI
This cli used to configure PIMV6 dr-priority on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 06:24:16 -08:00
sarita patra
a1caf7a88f pim6d: Adding "ipv6 pim" CLI
This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 06:24:14 -08:00
Mobashshera Rasool
18ca7de516 pim6d: Add ipv6 pim register-suppress-time CLI
Adding below CLI for pim6d
[no] ipv6 pim register-suppress-time (1-65535)

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
2322b99150 pim6d: Adding ipv6 pim rp keep-alive-timer
Adding below CLI for pim6d daemon
[no] ipv6 pim rp keep-alive-timer [(1-65535)]

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
28e32366e3 pim6d: Adding ipv6 pim keep-alive-timer
Adding the below CLI for pim6d daemon:
ipv6 pim keep-alive-timer (1-65535)

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
0da72f1f59 pim6d: Adding ipv6 pim packet CLI
Adding below CLI for pim6d daemon:
[no] ipv6 pim packet (1-255)

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
fb991ce9d4 pim6d: Adding ipv6 pim spt-switchover CLI
Adding the below CLIs for ipv6:
[no] ipv6 pim spt-switchover infinity-and-beyond
[no] ipv6 pim spt-switchover infinity-and-beyond prefix-list WORD

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
c73113ea9a pim6d: Implementing join-prune interval CLI
Adding "ipv6 pim join-prune interval (1-65535)

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
2328b7ef1e pimd: Moving pim_cli_get_vrf_name function to common file
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
26cd3d6612 pimd: Adding pim_cmd_common.h and .c
This is to keep the cmd changes common to v4 and v6 in this file.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Mobashshera Rasool
fb908b01a0 pimd: Removing unnecessary #if
Since pim_cmd.c file is moved to pimv4 make file, therefore
removing #if PIM_IPV !=6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Donald Sharp
3bf65aa1ae
Merge pull request #10400 from opensourcerouting/pim6-compilefix
pim6d: get running with ipv6 types throughout
2022-02-26 08:03:06 -05:00
Mobashshera Rasool
dfc26ad186 pimd: Fix Compilation issue in PIM
A recent merge caused this, fixing it.

Signed-off-by: Mobashshera Rasool <mrasool@gmail.com>
2022-02-16 09:04:08 -08:00
Donald Sharp
7b08708e65
Merge pull request #9224 from SaiGomathiN/saig
pimd: IGMP Query Generation
2022-02-16 11:26:03 -05:00
David Lamparter
5a46a3dea9 pim6d: drop off IGMP code
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-16 16:40:56 +01:00
David Lamparter
9bb93fa04e pim6d: IPv6-adjust neigh->source_addr
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
Donatas Abraitis
f7d8698313
Merge pull request #9697 from SaiGomathiN/igmp-sources
pimd: json support added
2022-02-11 07:53:02 +02:00
Donald Sharp
76802e5209
Merge pull request #10292 from opensourcerouting/pim6-addr-aux
pimd: start tackling IPv6 address operations
2022-02-08 13:09:08 -05:00
Donald Sharp
35e5ef55f1 pimd: Modify show ip pim assert to only show interesting bits
`show ip pim assert` shows S,G ifchannel information even when
there is no information available about the assert process.

Fix the code to not dump non-interesting cases.

Fixes: 10462
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-07 19:55:00 -05:00
Donatas Abraitis
77a2f8e592 *: Add camelCase JSON keys in addition to PascalCase
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-03 10:48:06 +02:00
Donatas Abraitis
3757f96485 bgpd,pimd,isisd,nhrpd: Convert to vty_json()
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-31 21:20:41 +02:00
David Lamparter
414db8e341
Merge pull request #10395 from qlyoung/fix-pim-xpath-buffer-sizes 2022-01-25 17:22:39 +01:00
Sai Gomathi
4527b70aed pimd: json support added for command "show ip igmp sources"
Add JSON support in the show command
“show ip igmp sources” with proper formatting.

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2022-01-25 06:29:37 -08:00
Quentin Young
d7073b211a pimd: fix misuse of xpath buf size constants
XPATH_MAXLEN denotes the maximum length of an XPATH. It does not make
sense to allocate a buffer intended to contain an XPATH with a size
larger than the maximum allowable size of an XPATH. Consequently this PR
removes buffers that do this. Prints into these buffers are now checked
for overflow.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2022-01-24 11:13:28 -05:00
Quentin Young
9e84443aca
Merge pull request #10398 from patrasar/pim_debug_fix 2022-01-21 14:08:48 -05:00
sarita patra
5c4508cb32 pimd: debug pim fixes
Enable debug commands "debug pim packetdump send" and
"debug pim packetdump receive" in config mode.

Display "debug pim nht rp" in show running config.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-01-21 03:05:18 -08:00
David Lamparter
8e8be741b5 pimd: replace pim_inet4_dump with %pPAs
Only pim_sgaddr uses are covered by this since regular in_addr is still
used for singular addresses, so only a part of pim_inet4_dump calls are
gone with this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17 14:10:57 +01:00
sarita patra
3051f4438d pim: Keeping list of address-family under gmp container
Renamed frr-igmp.yang to frr-gmp.yang, igmp to gmp container.
to support IGMP and MLD protocol.

frr-gmp.yang, created a list of address family under mgmd
container. For PIMV4 the key is IPV4, where as for PIMV6
the key is IPV6. This is done for PIMV6 development.

This commit will have all the northbound changes to support
IPV4 address family.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-01-17 05:10:20 -08:00
David Lamparter
62f59b58ba pimd: deploy pim_sgaddr_* helpers
Use _cmp/_hash/_match helpers for operations on pim_sgaddr to prepare
IPv6 support.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17 14:08:58 +01:00
David Lamparter
032a741219 pimd: move & deploy pim_addr_cmp() helper
Comparing `s_addr` isn't cutting it for IPv6 support.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17 14:08:29 +01:00
David Lamparter
2a27f13b21 pimd: move, rename and deploy pim_addr_is_any()
Replaces comparison against INADDR_ANY, so we can do IPv6 too.

(Renamed from "pim_is_addr_any" for "pim_addr_*" naming pattern, and
type fixed to bool.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17 14:03:26 +01:00
David Lamparter
98a81d2bff pimd: remove pim_str_sg_dump()
... and replace with `%pSG` printfrr specifier.  This actually used a
static buffer in the formatting function, so subsequent formatting would
overwrite earlier uses.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17 14:02:18 +01:00
David Lamparter
40a19188d5
Merge pull request #10179 from patrasar/pimv6_northbound 2022-01-17 13:23:21 +01:00
David Lamparter
cda1f5e098 pim6d: drop off MSDP code
There is no MSDP for IPv6, so drop this code out of pim6d.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-14 20:32:41 +01:00
David Lamparter
1c4d0ea4b3
Merge pull request #10279 from SaiGomathiN/pim_intf 2022-01-13 16:13:54 +01:00
sarita patra
698f414748 pim: Northbound changes accomodating IPV4 address family
frr-pim.yang, created a list of address family under pim
container. For PIMV4 the key is IPV4, where as for PIMV6
the key is IPV6. This is done for PIMV6 development.

This commit will have all the northbound changes to support
IPV4 address family.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-01-13 02:50:49 -08:00
David Lamparter
6fff2cc620 pimd: prefix_sg => pim_sgaddr
Mostly just 2 sed calls:

- `sed -e 's%struct prefix_sg%pim_sgaddr%g'`
- `sed -e 's%memset(&sg, 0, sizeof(pim_sgaddr));%memset(\&sg, 0, sizeof(sg));%g'`

Plus a bunch of fixing whatever that broke.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-12 18:24:25 +01:00
Sai Gomathi
18adcff1c0 pimd: Modifying members of pim_interface to accommodate IPv6 changes
Modifying the members of pim_interface which are to be used
for both IPv4 and IPv6 to common names(for both MLD and IGMP).

Issues: #10023

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2022-01-11 03:18:06 -08:00
Stephen Worley
ad1229a077
Merge pull request #10215 from FRRouting/revert-10164-name_change
Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes"
2021-12-15 17:40:53 -05:00
David Lamparter
62646e1350
Merge pull request #10167 from mobash-rasool/pim-upst-1 2021-12-14 17:54:22 +01:00
David Lamparter
29e5822590
Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes" 2021-12-14 17:33:24 +01:00
nsaigomathi
761e4fbad8 pimd: IGMP Query Generation
Problem:
=======
Generate query once cli is generating IGMPv2 report for IGMPv3 enabled interface

Description:
===========
If the version is not specified in the cli, it was taking version 2 as default

Fix:
===
If the version is not specified in the cli along with ip igmp generate-query-once,
the default will be the version enabled on that interface.

Signed-off-by: nsaigomathi <nsaigomathi@vmware.com>
2021-12-13 23:35:01 -08:00
Sai Gomathi
c5f76fad1a pimd: Modifying struct igmp_sock to gm_sock for IPv6
Modifying name of struct igmp_sock to struct gm_sock, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-12-03 10:27:12 -08:00
Sai Gomathi
a16db099e4 pimd: Modifying name of struct igmp_group to struct gm_group for IPv6.
Modifying name of struct igmp_group to struct gm_group, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-12-03 10:11:13 -08:00
Sai Gomathi
517001077f pimd: Modifying name of struct igmp_source to struct gm_source for IPv6.
Modifying name of struct igmp_source to struct gm_source, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-12-03 10:10:40 -08:00
Mobashshera Rasool
7caa9451af pimd: Modifying name of struct igmp_join to struct gm_join to accomodate IPv6 changes.
Fix:
====
Modifying name of struct igmp_join to struct gm_join, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Abhishek N R abnr@vmware.com
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-12-03 09:35:27 -08:00
Sai Gomathi
ea7d74d702 pimd: Modifying members of pim_interface to accommodate IPv6 changes
Modifying the members of pim_interface which are to be used
for both IPv4 and IPv6 to common names(for both MLD and IGMP).

Issue: #10023

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-12-02 23:12:58 -08:00
Donatas Abraitis
4e9a98636f *: Remove unused variables
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 18:45:41 +02:00
Donatas Abraitis
b0d5264e3f pimd: Replace inet_ntop to %pI4/6 for JSON outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 18:45:41 +02:00
David Lamparter
b09bd804ac pimd: move BSM clear into BSM code
... where it actually belongs.  And make a bunch of stuff static, since
it's no longer used across files now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-17 11:17:44 +01:00
David Lamparter
4efdb9c628 pimd: clean up BSR NHT & fix parallel links
The Bootstrap message RX path needs a RPF check for the BSR address,
and this is implemented both incorrectly as well as quite ugly.

Clean up and fix case when we have multiple interfaces to the same LAN
and/or ECMP nexthops (both would cause message duplication, the former
can even cause BSM forwarding loops.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-17 11:17:44 +01:00
Donald Sharp
e1d1b1dec7 pimd: Remove default from enum based switch
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-11-10 17:35:22 -05:00
Russ White
5393318d81
Merge pull request #9682 from adrianomarto/mesh-group-fix
pimd: fixing command "no ip msdp mesh-group member"
2021-09-28 10:21:17 -04:00