Commit Graph

100 Commits

Author SHA1 Message Date
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
ron
851a91b80a
pimd: fix igmp user config
user config should go ahead no matter it is a query router or not

Signed-off-by: ron <lyq140hf2006@163.com>
2021-11-26 21:20:40 +08: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
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
David Lamparter
e34e07e640 pimd: de-circularize includes
pimd's include files are very interdependent.  Let's chop that down a
bit to gain some flexibility.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-27 10:41:23 +02:00
Jafar Al-Gharaibeh
be64b65252
Merge pull request #9414 from mobash-rasool/pim-upst-4
pimd: IGMPv2 query timer gets delayed in a scenario
2021-08-24 16:11:57 -05:00
Christian Hopps
e8b7548c0d pimd: fix register suppress timer code
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-19 00:28:35 -04: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
Mobashshera Rasool
ccfc58caae pimd: IGMPv2 query timer gets delayed in a scenario
Problem Statement:
==================
IGMP query is sent at irregular intervals
(more than 30 seconds) when "ip igmp query-max-response-time 100"
command is executed multiple times.

RCA:
=================
When "ip igmp query-max-response-time 100" is executed, the timers
are reset resulting in the delay of sending the query.

Fix:
=================
When there is no change in the config value, we should not reset
the timers.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-08-17 00:24:30 -07: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
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
Rafael Zalamena
c72d97a5d9 pimd: make function names consistent
Rename functions (`pim_msdp_peer_new` => `pim_msdp_peer_add` and
`pim_msdp_peer_do_del` => `pim_msdp_peer_del`) to keep consistency and
update the `pim_msdp_peer_add` documentation to tell users that this is
also used for non meshed group peers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 16:00:09 -03: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
fb35f654e3 pimd: rename some MSDP functions
Rename and shorten function names to make them uniform.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-09 12:40:04 -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
Don Slice
3f1f8641fa pimd: adjust rp_keep_alive_time when register_suppress_time is changed
The router->register_suppress_time is used to derive the
rp_keep_alive_time, but when the suppress time was changed, pim was
not recalculating the rp_keep_alive_time and left it at the old value.
This fix applies the changes when a new suppress_time is entered
(or removed.)

Signed-off-by: Don Slice <dslice@nvidia.com>
2021-05-05 09:02:28 -04:00
Mark Stapp
f71e1ff6a9
Merge pull request #8545 from opensourcerouting/assert-our-own
*: make our own assert() actually work
2021-05-03 11:17:36 -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
David Lamparter
df5dfb77b5 pimd: zassert => assert
No point in having pimd use zassert() while everything else uses plain
assert().

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-23 12:25:47 +02:00
David Lamparter
1f8031f79a *: make sure config.h or zebra.h is first
`config.h` has all the defines from autoconf, which may include things
that switch behavior of other included headers (e.g. _GNU_SOURCE
enabling prototypes for additional functions.)

So, the first include in any `.c` file must be either `config.h` (with
the appropriate guard) or `zebra.h` (which includes `config.h` first
thing.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-23 12:06:35 +02:00
Sarita Patra
6f5f05029c pimd: fix crash pim register-suppress-time command
Signed-off-by: Sarita Patra <saritap@vmware.com>
2021-04-20 03:57:50 -07:00
Donald Sharp
89bf9d220d
Merge pull request #8333 from mobash-rasool/pim-fixes-2
pimd: Fix hold time related issues
2021-03-25 10:19:12 -04: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
Igor Ryzhov
4ba756ed9c *: fix aborts when validating configuration
There are places in the code where function nb_running_get_entry is used
with abort_if_not_found set to true during the config validation stage.
This is incorrect because when used in transactional CLI, the running
entry won't be set until the apply stage, and such usage leads to crash.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-16 17:25:49 +03:00
Mark Stapp
5bbfea53fc pimd: fix coverity SA warning in pim_nb_config.c
Fix a coverity warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-09 14:36:58 -05:00
Christian Hopps
e184ea7311 pimd: correctly get interface name for error message
This was found while doing libyang2 work (causes assert); however, it is
also incorrect for libyang1 (empty canonical value for incorrectly
referenced interface vs interface-name node).

While here, fix 2 other incorrect uses of "." on a container node.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-03-03 21:06:06 -05:00
Mark Stapp
d934e491ca bgpd, pimd: fix coverity SA warnings
Fix a couple of coverity warnings in pim and bgp.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-01 08:46:29 -05:00
Quentin Young
e348e10e21 pimd: do static mroute loop check in NB VALIDATE
We can proactively check whether this mroute will be nacked by loopfree
MFC checks so let's do it in the apply phase and emit a useful error
message.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-24 17:57:26 -05:00
Donald Sharp
853d21145c pimd: Prevent crash with igmp only config
Issue: #7892 has a startup config where only igmp
interfaces are created and a igmp report comes in.

Effectively we are not creating the regiface device unless
we do a `ip pim`.  This is incorrect we should always create
the regiface.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-21 10:37:50 -05:00
Sarita Patra
e1d1e95123 pimd: Fix SA issues found in Coverity Scan
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-20 01:47:04 -08:00
Sarita Patra
1dac87c88d pimd: fix indentation issues
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-18 23:20:26 -08: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
Sarita Patra
299c66b3b6 pimd: Northbound implementations for frr-pim, frr-igmp, frr-pim-rp
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-11-06 03:41:51 -08:00