Commit graph

490 commits

Author SHA1 Message Date
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
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