Commit graph

752 commits

Author SHA1 Message Date
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
Adriano Marto Reis 4687748973 pimd: fixing command "no ip msdp mesh-group member"
Deleting a mesh-group member no longer deletes the mesh-group.

Complete bug description at:
https://github.com/FRRouting/frr/issues/9664

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
2021-09-28 12:43:52 +10:00
David Lamparter 200f56710a pimd: fix UAF/heap corruption in BSM code
This `XFREE()` call is in plainly in the wrong spot.  `rp_all` (the
224.0.0.0/4 entry) isn't supposed to be free'd ever, and the
conditional above makes quite clear that it remains in use.

It may be possible to exploit this as a heap corruption bug, maybe even
as RCE.  I haven't tried; I randomly noticed this while working on the
BSM code.  Luckily this code is only run by the CLI for the clear
command, so the surface is very small.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-27 10:37:23 +02:00
David Lamparter a1a4295ade pimd: reformat after dropping indent levels
Intentionally separate here because the previous patch does a whole
bunch of "move stuff up 1 level of indentation", and reviewing that is
easier when you can use the ignore-whitespace option on diff.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-27 10:46:53 +02:00
David Lamparter dda4d23cca pimd: IGMP memberships are not querier specific
IGMP group/source memberships are a property of the interface;  the
particular IP address that the querier used to collect the data is
irrelevant.

... and IGMP packets get delivered only once to pimd anyway, since we
receive them on the "global" per-VRF IGMP socket.  (The one in igmp_sock
is only used for sending queries.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-27 10:42:53 +02:00
Christian Hopps 11ca35875c pimd: change ranges to 1..max, type align with IETF YANG.
While defaults are good picks for "reasonable" guesses, min and max
range values really aren't. Operators and experimenters often like to
configure "unreasonable" values to stress test, tests boundary
conditions and explore innovations.

With that in mind, change all ranges to 1..max (of type).

While we're here add optional ignored values in the "no" CLI forms.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-18 22:08:33 -04:00
Donatas Abraitis 7e736c7706
Merge pull request #9253 from donaldsharp/igmp_no
pimd: Allow more permisive versions of some no commands
2021-08-07 22:49:25 +03:00
Donald Sharp bb9ff200b3 pimd: Allow more permisive versions of some no commands
Some no commands were not accepting values and left us in
a situation where a cut-n-paste of the non-no line would
not be properly accepted.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-08-01 20:22:36 -04:00
Igor Ryzhov 9da01b0b7b *: cleanup interface node installation
The only difference in daemons' interface node definition is the config
write function. No need to define the node in every daemon, just pass
the callback as an argument to a library function and define the node
there.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-07-29 21:35:25 +03:00
Donald Sharp 53dc1b16aa pimd: Allow join prune intervals to be as small as 5 seconds
Allow the join-prune interval to be as small as 5 seconds instead
of limiting the value to 60.

This can and will come at a price of being able to converge less
mroutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-07-26 10:02:21 -04:00
Donald Sharp 6afa0b137a
Merge pull request #8983 from mobash-rasool/pim-upstreaming-activity
pimd: Minor fixes for BSM Show CLI and Hold Timer CLI
2021-07-22 08:35:06 -04:00
github login name 142774530a pimd: make pim interface hold interval range 1-630
Making the interface holdtime range to 3.5 times the hello-time

As per 7761, Section 4.11:
The Holdtime in a Hello message should be set to
   (3.5 * Hello_Period), giving a default value of 105 seconds.

Therefore providing the user also to configure max upto 3.5 times
the hello timer interval.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-06 22:51:10 -07:00
github login name 9a7cee2673 pimd: To print querierIP address on the querier and nonQuerier IGMP enabled intf
1. Add the querierIP object to igmp_sock datastruct to save the IP address of the querier.
   Management of the querierIP object is added.
2. To show the querier IP address in the CLI "show ip igmp interface".
3. To add the json object querierIP for querier IP address in the json CLI "show ip igmp interface json".

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-06 00:14:28 -07:00
github login name 6eedc1a5b9 pimd: Adding BSM status in the show commands
Adding BSM status in the CLI and json output for
"show ip pim interface"

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-05 04:29:02 -07:00
Rafael Zalamena 622fd3f11e pimd: support MSDP global timers configuration
Users can now configure:

 * Hold time
 * Keep alive
 * Connection retry

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-07-01 09:59:51 -03:00
Donald Sharp 70ec4ea388
Merge pull request #8871 from opensourcerouting/msdp-peer-rework
pimd: rework MSDP peer and add tests
2021-07-01 07:31:21 -04:00
Jafar Al-Gharaibeh 530b12cf6e pimd: make show ip mroute output consistent
We had 3 different string output formats in various places.
Make them all the same.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2021-06-29 14:19:35 -05:00
Rafael Zalamena 0ce04a08a3 pimd: allow MSDP group name 'default'
Don't assign a default group name for non meshed group peers, instead
use a flag.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 15:06:20 -03:00
Rafael Zalamena 56697b3e0a pimd: rework MSDP northbound integration
Simplify the MSDP handling functions and allow source changes.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 15:06:20 -03:00
Rafael Zalamena e2809e618b pimd: rework MSDP mesh-group code
Fully utilize the northbound to hold pointers to our private data
instead of searching for data structures every time we need to change a
configuration.

Highlights:

 * Support multiple mesh groups per PIM instance (instead of one)
 * Use DEFPY instead of DEFUN to reduce code complexity
 * Use northbound private pointers to store data structures
 * Reduce callback names size

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-09 12:32:24 -03:00
Martin Winter 202af4abaa
Merge pull request #8616 from donaldsharp/pim_ordering
pimd: There exists a path where on vrf bringup we do not create the p…
2021-05-20 18:49:56 +02:00
Christian Hopps 3bb513c399 lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang

staticd init load time of 10k routes now 6s vs ly1 time of 150s

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-13 16:24:48 -04:00
Donald Sharp d3cc1e4518 pimd: Remove pim->vrf_id and use pim->vrf->vrf_id
VRF creation can happen from either cli or from
knowledged about the vrf learned from zebra.
In the case where we learn about the vrf from
the cli, the vrf id is UNKNOWN.  Upon actual
creation of the vrf, lib/vrf.c touches up the vrf_id
and calls pim_vrf_enable to turn it on properly.
At this point in time we have a pim->vrf_id of
UNKNOWN and the vrf->vrf_id of the right value.

There is no point in duplicating this data.  So just
remove all pim->vrf_id and use the vrf->vrf_id instead
since we keep a copy of the pim->vrf pointer.

This will remove some crashes where we expect the
pim->vrf_id to be usable and it's not.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-12 14:36:59 -04:00
David Lamparter 4666232247
Merge pull request #8631 from dslicenc/pimd-timer-fix 2021-05-09 19:31:36 +02:00
Don Slice bb4b6eb547 pimd: stop displaying global parameters in each vrf
Problem reported that when certain pim commands were entered, they
showed up duplicated in the configuration both under default instance
and every vrf (whether pim was used there or not.) This was because
these particular parameters are global only and the function doing
the display would repeat for each vrf. This fix only displays those
in the default case (and removes them from the help for entering
under a vrf.)

Signed-off-by: Don Slice <dslice@nvidia.com>
2021-05-05 08:11:27 -04:00
Donald Sharp 2fd97fd87d
Merge pull request #8614 from opensourcerouting/msdp-fixes
pimd: MSDP trivial fixes
2021-05-04 07:21:51 -04:00
David Lamparter fdab294037 pimd: cleanup & convert bsm_rpinfo to TS list
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03 20:56:51 +02:00
David Lamparter d4a4525c12 pimd: cleanup & convert bsm_info to TS list
Just some cleanup before I touch this code;  switching to typesafe list
macros & putting the data directly inline.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03 20:55:59 +02:00
Rafael Zalamena 5a1a392032 pimd: reduce code duplication
Standardize a function to get the current VRF node name.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-05-03 12:30:02 -03:00
Rafael Zalamena 745b8d4a68 pimd: support BFD profiles configuration
Allow users to pre configure BFD sessions with a profile.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23 09:29:00 -03:00
Rafael Zalamena 1f3e6bf585 pimd: rework BFD integration
Rewrite the BFD integration code to use the new library.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23 09:28:57 -03:00
Mobashshera Rasool 93839459dc pimd: in 'no ip pim hello' add hold time as optional when hello interval given
Issue:
  User is allowed to configure only hello without hold timer but when undo
  config, the hold timer is mandatory as shown below:
  FRR-4(config-if)# ip pim hello 10
    <cr>
    (1-180)  Time in seconds for Hold Interval
  FRR-4(config-if)# ip pim hello 10
  FRR-4(config-if)# no ip pim hello 10
    (1-180)  Time in seconds for Hold Interval
  FRR-4(config-if)# no ip pim hello 10
  % Command incomplete: no ip pim hello 20

Fix:
  Making the hold timer as optional when undo config.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-03-25 10:27:48 +00:00
Mobashshera Rasool 899dd3392a pimd: Validation that hello should be less than hold time config.
Also included display of hold time in CLI 'show ip pim int <intf>' cmd
and json commands.

Issue:
PIM neighbor not coming up if hold time is less than hello timer
since hello is sent every 4 sec and hold is 1 sec,
because of this nbr is flapping

Fix:
Do not allow configuration of hold timer less than hello timer
Also reset the value of hold timer to 3.5 times to hello whenever
only hello is modified so that the relationship holds good.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-03-25 10:27:40 +00:00
Wesley Coakley cd72ad0133
pimd: show ip mroute column realign
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 12:19:53 -05:00
Donald Sharp 6599008a0f
Merge pull request #8044 from SaiGomathiN/nsg
pimd: json support added
2021-02-15 18:55:01 -05:00
nsaigomathi 85c8286666 pimd: json support added
Modify code to add JSON format output in show command.
"show ip igmp [vrf NAME] join" and "show ip igmp vrf all join" with proper formatting

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-02-09 05:33:14 -08:00
Igor Ryzhov 1ac88792c0 *: fix all backets
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-02 19:11:25 +03:00
vdhingra e7016ceb4c pimd : Added the command to clear the pim bsr data.
This command has been added in the context of
PIM BSM functionality. This command will clear the
data structs having bsr information.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2021-01-08 04:45:49 -08:00
Jafar Al-Gharaibeh d1e82cfd18
Merge pull request #7739 from mobash-rasool/pim-fixes
pimd: correcting the  definition for  Mroute flag "R"
2020-12-15 16:14:32 -06:00
Mobashshera Rasool e9376c880a pimd: correcting the definition for Mroute flag "R"
The flag "R" in below display description denotes the
SGRpt Pruned but the description shows something else
hence correcting the definition.

R2(config)# do show ip mroute
IP Multicast Routing Table
Flags: S- Sparse, C - Connected, P - Pruned
R - RP-bit set, F - Register flag

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-15 12:36:34 +00:00
Donatas Abraitis 3a6290bdd1 *: Replace s_addr check agains 0 with INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-14 21:03:38 +02:00
Sarita Patra 851cb2e5de pimd: mesh group not removed when configured for multiple groups
Issue:
Configure msdp mesh mg1 for 2 groups.
ip msdp mesh-group mg1 member 1.1.1.1
ip msdp mesh-group mg1 member 1.1.1.2

Remove mg1 for 1.1.1.1
no ip msdp mesh-group mg1 member 1.1.1.1

mg1 for 1.1.1.1 still present. This is fixed.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-12-01 05:35:57 -08:00
Sarita Patra e224558939 pimd: rp not removed when configured for multiple groups
Issue:
Configure RP.
ip pim rp 20.0.0.1 239.1.1.1/32
ip pim rp 20.0.0.1 239.1.1.2/32

Remove RP.
no ip pim rp 20.0.0.1 239.1.1.1/32
Rp is not removed. This is fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-12-01 05:34:54 -08:00
Mark Stapp 521c5b9de8 pimd: fix formatting in pim_cmd.c
Fix whitespace/indentation in pim_cmd.c

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-11-20 16:43:42 -05:00
Mark Stapp 5c90f56906 pimd: fix compilation errors in pim_cmd.c
Fix buffer sizes to eliminate compiliation warnings.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-11-20 15:45:32 -05:00
Donald Sharp cac886dd53
Merge pull request #6145 from patrasar/pim_nb_code_upstream
pimd: northbound backend code
2020-11-19 11:03:00 -05:00
Sarita Patra 1dac87c88d pimd: fix indentation issues
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-18 23:20:26 -08:00
Donald Sharp f8ca1bb935 pimd: A buffer may be used uninited
If we screw up and don't have the right flags we'll print
out garbage.  At the very least just print out nothing.

Signed-off-by: Donald Sharp <sharp@nvidia.com>
2020-11-18 11:42:06 -05:00
Sarita Patra 7003f63613 pimd: Northbound implementation for rp commands.
ip_pim_rp
ip_pim_rp_prefix_list
no_ip_pim_rp
no_ip_pim_rp_prefix_list

module: frr-pim-rp

  augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol/frr-pim:pim/frr-pim:address-family:
    +--rw rp
       +--rw static-rp
          +--rw rp-list* [rp-address]
             +--rw rp-address                     ietf-inet-types:ip-address
             +--rw (group-list-or-prefix-list)?
                +--:(group-list)
                |  +--rw group-list*   ip-multicast-group-address-prefix
                +--:(prefix-list)
                   +--rw prefix-list?   plist-ref

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:42:00 -08:00
Sarita Patra 0c949724d3 pimd: Northbound implementation for mlag, register-accept-list commands
pim_register_accept_list
ip_pim_mlag
no_ip_pim_mlag

Yang Model:
  augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol:
    +--rw pim
       +--rw address-family* [address-family]
          +--rw address-family          identityref
          +--rw mlag!
          |  +--rw peerlink-rif?   frr-interface:interface-ref
          |  +--rw reg-address?    ietf-inet-types:ip-address
          |  +--rw my-role?        enumeration <MLAG_ROLE_NONE>
          |  +--rw peer-state?     boolean <false>
          +--rw register-accept-list?   plist-ref

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:42:00 -08:00
Sarita Patra cf740d2e72 pimd: Northbound implementation for msdp mesh group, msdp peer commands
ip_msdp_peer
no_ip_msdp_peer
ip_msdp_mesh_group_member
no_ip_msdp_mesh_group_member
ip_msdp_mesh_group_source
no_ip_msdp_mesh_group_source
no_ip_msdp_mesh_group

Yang Model:
  augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol:
    +--rw pim
       +--rw address-family* [address-family]
          +--rw address-family          identityref
          +--rw msdp-mesh-group!
          |  +--rw mesh-group-name?   string
          |  +--rw member-ip*         ietf-inet-types:ip-address
          |  +--rw source-ip?         ietf-inet-types:ip-address
          +--rw msdp-peer* [peer-ip]
          |  +--rw peer-ip      ietf-inet-types:ip-address
          |  +--rw source-ip?   ietf-inet-types:ip-address

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:42:00 -08:00
Sarita Patra f206085e19 pimd: Northbound implementation for ssm prefix-list, ssmpingd command
ip_pim_ssm_prefix_list
no_ip_pim_ssm_prefix_list
no_ip_pim_ssm_prefix_list_name
no_ip_ssmpingd
ip_ssmpingd

Yang Model:
  augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol:
    +--rw pim
       +--rw address-family* [address-family]
          +--rw address-family          identityref
          +--rw ssm-prefix-list?        plist-ref
          +--rw ssm-pingd-source-ip*    ietf-inet-types:ip-address

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:42:00 -08:00
Sarita Patra db9cca95be pimd: Northbound implementation for send-v6-sec and spt switchover cmds
ip_pim_v6_secondary
no_ip_pim_v6_secondary
ip_pim_spt_switchover_infinity
ip_pim_spt_switchover_infinity_plist
no_ip_pim_spt_switchover_infinity
no_ip_pim_spt_switchover_infinity_plist

Yang Model:
  augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol:
    +--rw pim
       +--rw address-family* [address-family]
          +--rw address-family          identityref
          +--rw send-v6-secondary?      boolean <true>
          +--rw spt-switchover
          |  +--rw spt-action?                 enumeration <PIM_SPT_IMMEDIATE>
          |  +--rw spt-infinity-prefix-list?   plist-ref

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra 49c6b2aac8 pimd: Northbound implementation for ecmp, rebalance, KA timer.
ip_pim_ecmp
no_ip_pim_ecmp
ip_pim_ecmp_rebalance
no_ip_pim_ecmp_rebalance
ip_pim_rp_keep_alive
no_ip_pim_rp_keep_alive
ip_pim_keep_alive
no_ip_pim_keep_alive

Yang Model:
  augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol:
    +--rw pim
       +--rw ecmp?                  boolean <false>
       +--rw ecmp-rebalance?        boolean <false>
       +--rw keep-alive-timer?      uint16 <210>
       +--rw rp-keep-alive-timer?   uint16 <210>

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra d27b7884fb pimd: Northbound implementation for pim router commands.
ip_pim_joinprune_time
no_ip_pim_joinprune_time
ip_pim_register_suppress
no_ip_pim_register_suppress
ip_pim_packets
no_ip_pim_packets

Yang Model:
module: frr-pim
  +--rw pim
     +--rw packets?                  uint8 <3>
     +--rw join-prune-interval?      uint16 <60>
     +--rw register-suppress-time?   uint16 <60>

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra 675c8fdef0 pimd: Northbound implementation for mroute, use-source, boundary_oil cmd
interface_ip_pim_boundary_oil
interface_no_ip_pim_boundary_oil
interface_ip_mroute
interface_no_ip_mroute
interface_pim_use_source
interface_no_pim_use_source

Yang Model:
  augment /frr-interface:lib/frr-interface:interface:
    +--rw pim!
       +--rw address-family* [address-family]
          +--rw address-family            identityref
          +--rw use-source?               ietf-inet-types:ip-address
          +--rw multicast-boundary-oil?   plist-ref
          +--rw mroute* [source-addr group-addr]
             +--rw oif?           frr-interface:interface-ref
             +--rw source-addr    ietf-inet-types:ip-address
             +--rw group-addr     ietf-routing-types:ip-multicast-group-address

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra b73779d3d0 pimd: Northbound implementation for pim bfd commands.
ip_pim_bfd
ip_pim_bfd_param
no_ip_pim_bfd
no_ip_pim_bfd_param

Yang Model:
  augment /frr-interface:lib/frr-interface:interface:
    +--rw pim!
       +--rw bfd!
       |  +--rw min-rx-interval?   uint16 <300>
       |  +--rw min-tx-interval?   uint16 <300>
       |  +--rw detect_mult?       uint8 <3>

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra e3eb2bab27 pimd: Northbound implementation for pim commands.
interface_ip_pim_drprio
interface_no_ip_pim_drprio
interface_ip_pim_activeactive
interface_ip_pim_hello
interface_no_ip_pim_hello
ip_pim_bsm
no_ip_pim_bsm
ip_pim_ucast_bsm
no_ip_pim_ucast_bsm

Yang Model:

 augment /frr-interface:lib/frr-interface:interface:
    +--rw pim!
       +--rw hello-interval?   uint8 <30>
       +--rw hello-holdtime?   uint8
       +--rw bsm?              boolean <false>
       +--rw unicast-bsm?      boolean <false>
       +--rw active-active?    boolean <false>
       +--rw dr-priority?      uint32 <1>

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra 50d194f8c8 pimd: Northbound implementation for pim commands.
interface_ip_pim_ssm
interface_ip_pim_sm
interface_ip_pim
interface_no_ip_pim_ssm
interface_no_ip_pim_sm
interface_no_ip_pim

Yang Model:

augment /frr-interface:lib/frr-interface:interface:
    +--rw pim!
       +--rw pim-enable?       boolean <false>

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Sarita Patra b0475d5a52 pimd: Northbound implementation for igmp commands.
interface_ip_igmp
interface_no_ip_igmp
interface_ip_igmp_join
interface_no_ip_igmp_join
interface_ip_igmp_query_interval
interface_no_ip_igmp_query_interval
interface_ip_igmp_version
interface_no_ip_igmp_version
interface_ip_igmp_query_max_response_time
interface_no_ip_igmp_query_max_response_time
interface_ip_igmp_query_max_response_time_dsec
interface_no_ip_igmp_query_max_response_time_dsec
interface_ip_igmp_last_member_query_count
interface_no_ip_igmp_last_member_query_count
interface_ip_igmp_last_member_query_interval
interface_no_ip_igmp_last_member_query_interval

IGMP yang tree:
module: frr-igmp
  augment /frr-interface:lib/frr-interface:interface:
    +--rw igmp!
       +--rw igmp-enable?                  boolean <false>
       +--rw version?                      uint8
       +--rw query-interval?               uint16 <125>
       +--rw query-max-response-time?      uint8 <100>
       +--rw last-member-query-interval?   uint8 <10>
       +--rw robustness-variable?          uint8 <2>
       +--rw address-family* [address-family]
          +--rw address-family    identityref
          +--rw static-group* [group-addr source-addr]
             +--rw group-addr     ietf-routing-types:ip-multicast-group-address
             +--rw source-addr    ietf-inet-types:ip-address

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:59 -08:00
Mark Stapp ee2bbf7ce2 pimd: replace inet_ntoa
Replace all use of inet_ntoa, using %pI4 or inet_ntoa instead

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-22 10:13:56 -04:00
Donatas Abraitis 2dbe669bdf :* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-22 09:07:41 +03:00
Renato Westphal 8b6b6b694d
Merge pull request #7222 from idryzhov/fix-debug
fix debug commands node inconsistencies
2020-10-09 21:58:24 -03:00
Adriano Marto Reis 9fbd9fc48f pimd: MSDP SA forwarding
* If the MSDP peer receives the SA from a non-RPF peer towards the
originating RP, it will drop the message.
* SA messages are forwarded away from the RP address only.
* SA messages are not forwarded within the mesh group.
* Preventing the MSDP connection from being dropped due to RPF check
failure (RFC3618, section 13 "MSDP Error Handling")

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
Signed-off-by: Adriano Reis <areis@barrukka.local>
2020-10-06 08:11:24 -04:00
Igor Ryzhov dd73744d8c *: move "show debugging ..." commands to enable node
Use the same node for "show debugging" commands in all daemons.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 15:06:05 +03:00
Donald Sharp d76c38ade3 pimd: Prevent Null string %s issues
There are couple spots where group may be NULL and
when we output strings associated with it we should
ensure we are not doing something stupid.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-07-18 09:46:06 -04:00
David Lamparter 3efd0893d0 *: un-split strings across lines
Remove mid-string line breaks, cf. workflow doc:

  .. [#tool_style_conflicts] For example, lines over 80 characters are allowed
     for text strings to make it possible to search the code for them: please
     see `Linux kernel style (breaking long lines and strings)
     <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
     and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.

Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 10:37:25 +02:00
Quentin Young 007c1dd490
Merge pull request #6114 from rgirada/frr-static
pimd: Providing json support for few pim commands
2020-07-06 13:04:43 -04:00
rgirada 91c0fb4779 pimd: Modifying "show ip mroute json" o/p.
Description:
"show ip mroute" displays only installed(kernel) mroutes, where
as "show ip mroute json" diplays both installed and not installed
mroutes in the o/p.To make this consistant, diplaying only valid
routes in json o/p.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-05-30 05:15:43 -07:00
rgirada 922e754430 pimd: Providing json support for few pim commands.
Description:
Added json support for the following PIM commands.
1. show ip mroute [vrf NAME] count [json]
2. show ip mroute vrf all count [json]
3. show ip mroute [vrf NAME] summary [json]
4. show ip mroute vrf all summary [json]

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-05-30 05:15:27 -07:00
Donald Sharp 310885bdd8
Merge pull request #5881 from patrasar/2386420
pimd: add show ip multicast count [json] command
2020-05-26 09:21:10 -04:00
Sarita Patra 8c8d70319e pimd: add show ip multicast count [json] command
Added a new show command "show ip multicast", display the multicast data
packet in and out on interface level.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-05-05 00:27:47 -07:00
Donald Sharp 5d06e8a60e pimd: Add a needed space for formatting
Display a space in the output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-28 07:59:18 -04:00
David Lamparter c334a16ef1
Merge pull request #6262 from qlyoung/remove-sprintf 2020-04-23 20:27:26 +02:00
Donald Sharp bda96cdd33
Merge pull request #6126 from sarav511/watermark
pimd: Implement watermark warning for igmp group count and add igmp group count
2020-04-21 16:14:21 -04:00
Quentin Young 0880854185 pimd, lib: suppress compiler warnings on snprintf
truncation warnings on old compilers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-21 13:13:06 -04:00
Quentin Young 772270f3b6 *: sprintf -> snprintf
Replace sprintf with snprintf where straightforward to do so.

- sprintf's into local scope buffers of known size are replaced with the
  equivalent snprintf call
- snprintf's into local scope buffers of known size that use the buffer
  size expression now use sizeof(buffer)
- sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp
  buffer followed by strlcat

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-20 19:14:33 -04:00
David Lamparter f4b8291fcb *: move CLI node names to cmd_node->name
And again for the name.  Why on earth would we centralize this, just so
people can forget to update it?

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:59 +02:00
David Lamparter 243895805a *: move CLI parent data to cmd_node->parent_node
Same as before, instead of shoving this into a big central list we can
just put the parent node in cmd_node.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter 612c2c15d8 *: remove second parameter on install_node()
There is really no reason to not put this in the cmd_node.

And while we're add it, rename from pointless ".func" to ".config_write".

[v2: fix forgotten ldpd config_write]

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter 249a771b63 *: remove cmd_node->vtysh
The only nodes that have this as 0 don't have a "->func" anyway, so the
entire thing is really just pointless.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter 62b346eefa *: clean up cmd_node initializers
... and use named assignments everywhere (so I can change the struct.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
Donald Sharp 950b395e8e
Merge pull request #6011 from patrasar/pim-no-msdp-group-cmd
pimd: added no ip msdp mesh-group <word>
2020-04-14 08:35:09 -04:00
Sarita Patra 34d86eff8e pimd: added no ip msdp mesh-group <word>
Issue: no ip msdp mesh-group <word> source command
deleting the mesh group, which might be used by the member.

Solution: no ip msdp mesh-group <word> source command, deletes
the mesh-group source.
Add a new cli command "no ip msdp mesh-group <word>" to delete
the mesh group.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-04-13 02:40:51 -07:00
saravanank 4d36096888 pimd: show ip igmp groups json output - Make group array for each interface
JSON output for igmp group display is modified as follows for better python handling.
1. Under each interface make array of group as an object
2. Include source and group inside each group object

These improvements are required for the set of topotest cases which will be upstreamed shortly.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-04-08 21:39:21 -07:00
saravanank 339f769530 pimd: Implement watermark warning for igmp group count and add igmp group count
This CLI will allow user to configure a igmp group limit which will generate
a watermark warning when reached.
Though watermark may not make sense without setting a limit, this
implementation shall serve as a base to implementing limit in future and helps
tracking a particular scale currently.

Testing:
=======

ip igmp watermark-warn <10-60000>

on reaching the configured number of group, pim will issue warning

2019/09/18 18:30:55 PIM: SCALE ALERT: igmp group count reached watermak limit: 210(vrf: default)

Also added group count and watermark limit configured on cli - show ip igmp groups [json]

<snip>

Sw3# sh ip igmp groups json
{
  "Total Groups":221,  <=====
  "Watermark limit":210, <=========
  "ens224":{
    "name":"ens224",
    "state":"up",
    "address":"40.0.0.1",
    "index":6,
    "flagMulticast":true,
    "flagBroadcast":true,
    "lanDelayEnabled":true,
    "groups":[
      {
        "source":"40.0.0.1",
        "group":"225.1.1.122",
        "timer":"00:03:56",
        "sourcesCount":1,
        "version":2,
        "uptime":"00:00:24"

<\snip>

<snip>

Sw3(config)# do sh ip igmp group
Total IGMP groups: 221
Watermark warn limit(Set) : 210
Interface        Address         Group           Mode Timer    Srcs V Uptime
ens224           40.0.0.1        225.1.1.122     ---- 00:04:06    1 2 00:13:22
ens224           40.0.0.1        225.1.1.144     ---- 00:04:02    1 2 00:13:22
ens224           40.0.0.1        225.1.1.57      ---- 00:04:01    1 2 00:13:22
ens224           40.0.0.1        225.1.1.210     ---- 00:04:06    1 2 00:13:22

<\snip>

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-04-08 21:39:13 -07:00
Quentin Young a5f610e474 pimd: fix BSM JSON keys
We use camelCase keys in FRR.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-05 23:54:12 -04:00
Quentin Young 4ad05982dc
Merge pull request #6080 from sarav511/buf_inc
pimd: increase buffer size for prefix str while printing bsrp-info
2020-03-24 12:29:47 -04:00
Russ White bb1cceed4a
Merge pull request #6024 from patrasar/mroute_reshape
pimd: re-shaping show ip mroute outout
2020-03-24 10:16:43 -04:00
saravanank 93a5bc8022 pimd: increase buffer size for prefix str while printing bsrp-info
Problem: output is cut short when prefix string all octets are 3 digit.
RCA: Buffer was allocated only to hold ip addr str.

Fix: Added 3 bytes more to hold prefix length and a /.
Modified buffer in 'show ip pim bsrp-info' and 'show ip pim bsm database'

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-24 00:24:56 -07:00
Donald Sharp a01f317b0f
Merge pull request #6008 from sarav511/max_vif
pimd: Do not allow to configure multicast on more than MAXVIF interfaces
2020-03-23 11:28:45 -04:00
Donatas Abraitis 2a7280e2e5
Merge pull request #5882 from patrasar/2386429
pimd: fix pim interface traffic & pim rp-info json command
2020-03-18 11:26:44 +02:00
Sarita Patra 5dff8b9dcf pimd: re-shaping show ip mroute outout
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-17 21:44:20 -07:00
Russ White 09c04bc490
Merge pull request #5849 from donaldsharp/pim_register_prefix_list
Pim register prefix list
2020-03-17 14:57:10 -04:00
Donald Sharp 7967afda07
Merge pull request #5880 from patrasar/2371558
pimd: fix OIL not removed after IGMP prune
2020-03-17 13:40:53 -04:00
Donald Sharp fc74cbe76c
Merge pull request #5940 from patrasar/214257
pimd: add flags in show ip mroute command
2020-03-17 06:38:41 -04:00
Sarita Patra 9443810eef pimd: fix OIL not removed after IGMP prune
Issue: Client1------LHR-----(int-1)RP(int-2)------client2
Client2 send IGMP join for group G.
Client1 send IGMP join for group G.
verify show ip mroute in RP, will have 2 OIL.
Client2 send IGMP leave.
Verify show ip mroute in RP, will still have 2.

Root cause: When RP receives IGMP join from client2, it creates
a (s,g) channel oil and add the interface int-2 into oil list and
set the flag PIM_OIF_FLAG_PROTO_IGMP to int-2
Client1 send IGMP join, LHR will send a (*,G) join to RP. RP will
add the interface int-1 into the oil list of (s,g) channel_oil and
will set the flag PIM_OIF_FLAG_PROTO_IGMP and PIM_OIF_FLAG_PROTO_PIM
to the int-1 and set PIM_OIF_FLAG_PROTO_PIM to int-2 as well. It is
happening because of the pim_upstream_inherited_olist_decide() and
forward_on() get all the oil and update the flag wrongly.
So now when client 2 sends IGMP prune, RP will not remove the int-2
from oil list since both PIM_OIF_FLAG_PROTO_PIM & PIM_OIF_FLAG_PROTO_IGMP
are set, it just unset the flag PIM_OIF_FLAG_PROTO_IGMP.

Fix: Introduced new flags in if_channel, PIM_IF_FLAG_MASK_PROTO_PIM
& PIM_IF_FLAG_MASK_PROTO_IGMP. If a if_channel is created because of
pim join or pim (s,g,rpt) prune received, then set the flag
PIM_IF_FLAG_MASK_PROTO_PIM. If a if_channel is created becuase of IGMP
join received, then set the flag PIM_IF_FLAG_MASK_PROTO_IGMP.
When an interface needs to be added into the oil list check if
PIM_IF_FLAG_MASK_PROTO_PIM or PIM_IF_FLAG_MASK_PROTO_IGMP is set, then
update oil flag accordingly.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-16 21:54:34 -07:00
Sarita Patra a7a5472ef2 pimd: fix pim interface traffic & pim rp-info json command
Issue 1: "show ip pim interface traffic" not show prune TX/RX
Rootcause : not added the variable in the json
Fix : add prune TX/RX in show ip pim interface traffic json

Issue 2: "show ip pim rp-info" not shows the key iAmRp when it is false
Rootcause: Only display the key when the value is true.
Fix: add iAmRp as false in show ip pim rp-info json

Issue 3: "show ip pim rp-info" not showing outbound interface if it is empty
Rootcause: Only display when there is any OIL

Fix: When RP is not reachable then, the outbound interface is Unknown
The command "show ip pim rp-info json" not displaying the outbound
interafce if it is unknown

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-16 21:44:38 -07:00
Sarita Patra 6a42461973 pimd: add flags in show ip mroute command
S - Sparse Mode
C - indicates there is a member of the group directly connected to the router.
R -set on an (S, G) by the receipt of an (S, G) RP bit prune message.
F -This indicates that this router is a FHR and send register messages to RP to inform RP of this active source
P - OIL list is NULL. That means the router will send a prune.
T - At least one packet received via SPT.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-16 21:38:56 -07:00
saravanank ccf696e85f pimd: Do not allow to configure multicast on more than MAXVIF interfaces
RCA: When configured more than 32(MAXVIS), the inerfaces that are configured
after 32nd interfaces have the value of MAXVIF.
This is used as index to access the free vif tracker of array size 32(MAXVIFS).
So the channel oil list pointer which is present as the next field in pim structure get corrupt, when updating free vif.
This gets accessed during rpf update resulting in crash.

Fix: Refrain from allocating mcast interface structure and throw config error when more than MAXVIFS are attempted to configure.
Max vif checks are exempted for vrf device and pimreg as vrf device will be the first interface and not expected to fail and pimreg has reserved vif.
vxlan tunnel termination device creation has this check and throw warning on max vif.
All other creation are through CLI.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-16 19:49:18 -07:00
saravanank 36afe48622 pimd: show ip pim bsr json output - removing vtysh caption
Root cause: The header display is put in common outside the vtysh/json if-else.
Fix: Brought inside vtysh condition.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-15 18:58:53 -07:00
Russ White 7f6c322d50
Merge pull request #5839 from donaldsharp/upstream_merge
Upstream merge of missed MLAG code
2020-03-09 15:34:18 -04:00
Donald Sharp 5cb1323595
Merge pull request #5942 from patrasar/2438087
pimd: Display mroute uptime per (s,g) entry
2020-03-09 08:47:10 -04:00
Sarita Patra dfd12d0255 pimd: Display mroute uptime per (s,g) entry
Issue: show ip mroute displays the mroute uptime (time when
mroute installed into the kernel) per oif.
This is confusing.

Fix: Display mroute uptime per (s,g) mroute entry.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-09 00:30:34 -07:00
Donald Sharp f4e74bd038 pimd: Add ip pim register-accept-list PLIST command
When pim receives a register packet, we will apply the
received source to the prefix list.  If accepted normal
processing continues.  If denied we will send a register
stop message to the source.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:27:01 -05:00
Donald Sharp 1c4e26bc06 pimd: Rename the PIM_SPT_PLIST_NAME to PIM_PLIST_NAME
The memory type PIM_SPT_PLIST_NAME is specific to
SPT but we are going to store more prefix-list names
in pim, make it generic to allow for less confusion
in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:24:21 -05:00
Donald Sharp 17823cdd2c pimd: Add accidently missed code during upstreaming process
There was some code missed during the upstreaming process
due to code squash.  Identify and put into a commit
to keep code consistent and correct.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:02:52 -05:00
Donald Sharp 5e81f5dd1a *: Finish off the __PRETTY_FUNCTION__ to __func__
FINISH IT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 09:23:22 -05:00
Donatas Abraitis 15569c58f8 *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__
Just keep the code cool.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-05 20:23:23 +02:00
Russ White 30ac36dbfc
Merge pull request #5897 from patrasar/2415676
pimd: fix crash seen while executing igmp related configuration
2020-03-03 09:35:43 -05:00
Sarita Patra 4f007a5a03 pimd: fix crash seen while executing igmp related configuration
Issue 1:
1. Enable pim on an interface.
2. Configure query-interval or query max response time,
which results in pimd crash.

Root cause:
1. When pim is enabled on an interface, it creates a igmp socket
with querier_timer and other_querier time as NULL.
2. When query-interval/max_response_time is configured, it call the
function igmp_sock_query_reschedule() to reshedule the query. This
function check either of querier_timer or other_querier timer should
be running. Since in this case both are NULL, it results in crash.

Issue 2:
1. Enable pim on an interface.
2. Execute no ip igmp query-interval or query max response time,
which results in pimd crash.

Root cause:
1. When pim is enabled on an interface, it creates a pim interface
with querier_timer and other_querier time as NULL.
2. When no ip igmp query-interval/max_response_time is executed, it will
check either of querier_timer or other_querier timer should be running.
Since in this case both are NULL, it results in crash.

Fix:
When pim is enabled on an interface, it creates a igmp socket with
mtrace_only as true. So add a check if mtrace_only is true, then don't
reshedule the query.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-03 03:35:43 -08:00
Donald Sharp 7f5818fbd6 *: change hash_backet to hash_bucket
It's been a year search and destroy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-28 13:59:13 -05:00
Jafar Al-Gharaibeh 4d67e75282 Revert "*: change hash_backet to hash_bucket"
This reverts commit 3895c42a2e.

LabN CI update needs to be coordinated before merging this

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2020-02-27 09:52:02 -06:00
Donald Sharp 3895c42a2e *: change hash_backet to hash_bucket
It's been a year search and destroy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-26 20:03:34 -05:00
Mark Stapp 6c1b7a8c49 pimd: fix SA reports
Fix a couple of SA warnings introduced recently; replace some
'strcpy' calls.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-02-20 11:32:32 -05:00
Anuradha Karuppiah f80427e9e7 pimd: pim mlag show commands
1. show ip pim mlag summary
provides MLAG session information and stats
2. show ip pim mlag upstream
displays the upstream entries synced across the MLAG switches

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-02-14 09:18:30 -08:00