Commit Graph

30591 Commits

Author SHA1 Message Date
Louis Scalbert
f3529a5522 topotests: isis-tilfa add a switchover test after linkdown
Add a switchover test that consists in shutting down an interface.

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Louis Scalbert
0cd33c983d isisd: avoid fast-reroute from running twice on a down interface event
isis_ifp_down() may in some circumstances be called twice on a down
interface event.

Avoid applying fast-reroute on an already down interface.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Louis Scalbert
4e689dcddb isisd: avoid fast-reroute on down adjacency when the interface is down
When an IS-IS interface is coming down, fast-reroute may be triggered
twice: a first time after the detection of the interface down event and
a second time after the detection of the adjacency down (because of the
expiration of the ISIS Hello or BFD timers).

Avoid a BFD down event from running fast-reroute another time if the
interface was already detected down.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Louis Scalbert
0e83283c66 isisd: apply fast-reroute when an interface falls down
Backup routes are sent to zebra by routing daemons such as isisd so that
the dataplane can pre-install them with a lower priority. When an
interface comes down, the associated primary routes are discarded by the
dataplane and the backup ones take over.

However, some dataplanes (e.g. Netlink ones) do not pre-install the
backup routes. Associated prefixes have no next-hop until SPF is
recomputed.

Apply fast-reroute as soon as an interface falls down by sending route
UPDATEs to zebra.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Louis Scalbert
5389c4f7e2 isisd: allow nexthop lookup on interface only
Allow the nexthoplookup function to return the first nexthop found on
ifindex interface if the IP is unspecified.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Louis Scalbert
8a65b22dac isisd: remove previous labels before fast-reroute
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Louis Scalbert
694fa86728 isisd: apply fast-reroute on an adjacency failure
When a adjacency falls down, the primary routes are not deleted on the
dataplane until the SPF is recomputed. Even the backup routes are
pre-installed on the dataplane, there is no fast-route optimization.

Reasons for an adjacency to come down are:
- BFD down
- Hello timer timeout
- User adjacency clear

Apply the backup route switchover for fast-reroute as soon an IS-IS
adjacency falls down before the first SPF re-computation. Pre-computed
backup routes are applied sooner.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-10-24 11:50:13 +02:00
Donatas Abraitis
6eb8da37b0
Merge pull request #12026 from kuldeepkash/bgp_local_asn
tests: Add bgp local asn test suite
2022-10-24 09:16:59 +03:00
Donatas Abraitis
0a8e6ec02d
Merge pull request #12173 from sworleys/VNI-chrstr-Fix
bgpd: fix vni_str NULL check in evpn rt show run
2022-10-24 08:59:17 +03:00
Donald Sharp
a0efeb3ab5
Merge pull request #12178 from opensourcerouting/fix/revert_13111667513a0f91a8e875cdf12c940ea2b60b05
Revert "doc: Add `neighbor PEER extended-optional-parameters` command"
2022-10-23 15:13:26 -04:00
Donatas Abraitis
37abfd6d19 Revert "doc: Add neighbor PEER extended-optional-parameters command"
I don't know how I missed that it was already defined. Let's just revert it.

This reverts commit 1311166751.
2022-10-21 21:45:29 +03:00
Lou Berger
c4fff21b8b topotest: ospfapi - test opaque all type add/withdrawals, with and wo zero length
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-21 15:28:02 +00:00
Lou Berger
2f30cb2574 ospfd/ospfclient: add option to flush/withdrawal with zero length
default behavior is unchanged, i.e., to not zero

Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-21 15:27:58 +00:00
Stephen Worley
20e81e1857 bgpd: fix vni_str NULL check in evpn rt show run
Fix the vni_str NULL check for wildcard route-targets
in evpn show run. This will never be NULL if we add 1
here. Though it should also never be NULL since ":" should
always exist. Better to be safe than sorry.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-10-21 11:18:12 -04:00
Lou Berger
08172828f6 ospfd: ospf_apiserver.c - fix link local opaque LSA delete
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-21 15:08:53 +00:00
Donatas Abraitis
e1a14d4700
Merge pull request #12094 from patrasar/pimv6_rp_linklocal
pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP
2022-10-21 10:34:28 +03:00
Donatas Abraitis
8e9729cc72
Merge pull request #11600 from patrasar/pimv6_bsm_clis
pim6d:  BSM CLIs implementation
2022-10-21 09:41:22 +03:00
Jafar Al-Gharaibeh
cd5649848d
Merge pull request #12140 from opensourcerouting/fix/watchfrr_dont_givup
watchfrr: Delay restart_kill if still reading configuration
2022-10-20 23:46:47 -05:00
Jafar Al-Gharaibeh
4f40a902c0
Merge pull request #12160 from donaldsharp/debug_nh_fix
Debug nh fix
2022-10-20 23:43:46 -05:00
Kuldeep Kashyap
0074297916 tests: Add lib changes to support bgp local asn feature
Added lib changes to support bgp local
asn feature config changes

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-10-21 09:23:03 +05:30
Kuldeep Kashyap
a65b1a7573 tests: Add bgp local asn test suite
Adding test to verify functionality
of local asn bgp feature.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-10-21 09:22:49 +05:30
Jafar Al-Gharaibeh
7c7db42f46
Merge pull request #12155 from LabNConsulting/working/lb/opaque-lsa-zero-len
OSPF: allow for zero length opaque LSAs
2022-10-20 09:19:45 -05:00
Donatas Abraitis
0775362306 bgpd: Notify BGP conditional advertisement thread when the peer goes down
Also, make sure we check if the advertisement table changed using FROM peer,
not TO peer.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-10-20 15:21:47 +03:00
Donald Sharp
78946603e1 lib: Remove unnecessary comparison, for linked list
In the comparison function for a linked list code was
always checking against passed in NULL's.  The comparison
function will never receive a NULL value for data from
the linklist.c code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-20 07:43:45 -04:00
Donald Sharp
040a0e6d26 zebra: Fix debug of filtering out prefix due to routemap
The debug for notification about a filtered prefix was
just printing the nexthop ifindex and vrf id.  Not all
nexthops have this data.  Just print out the actual nexthop

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-20 07:43:45 -04:00
Sarita Patra
aae2af98ca pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP
Problem:
=======
frr(config)# do show ipv6 pim interface
 Interface  State  Address                   PIM Nbrs  PIM DR  FHR  IfChannels
 ens192     up     fe80::250:56ff:feb7:3619  0         local   0    1

Configure ens192 interface link-local address as RP.
frr(config)# ipv6 pim rp fe80::250:56ff:feb7:3619
No Path to RP address specified: fe80::250:56ff:feb7:3619

frr(config)# do show ipv6 pim rp-info
 RP address                group/prefix-list  OIF      I am RP  Source  Group-Type
 fe80::250:56ff:feb7:3619  ff00::/8           Unknown  yes      Static  ASM

Fix:
===
RP should not be link-local, multicast and unspecified address.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 02:37:28 -07:00
Sarita Patra
dce0f7468d pimd, pim6d: Define pim_addr_is_multicast API
pim_addr_is_multicast API will check if the address is multicast
address or not.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:11:52 -07:00
Sarita Patra
44374226d8 pim6d: Update BSM cli/show/debug commands in pimv6.rst
Update the below commands in pimv6.rst
ipv6 pim bsm
ipv6 unicast-bsm
show ipv6 pim bsr
show ipv6 pim bsrp-info
show ipv6 pim bsm-database
debug pimv6 bsm

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
997f2f1522 pim6d: Add "show ipv6 pim bsrp-info [vrf NAME] [json]" cli
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
4d6ca7913f pim6d: Add "[no] debug pimv6 bsm" cli
The cli "[no] debug pimv6 bsm" is used to enable/
disable bsm debugs for PIMV6

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
2792bff145 pim6d: Add "show ipv6 show ip pim bsm-database [vrf NAME] [json]" cli
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
a0299f87cf pimd: Move "show ip pim bsm-database" cmd to DEFPY
Added common pim_show_bsm_db_helper to suppport both PIM and
PIMV6.
pim_show_bsm_db is moved to pim_cmd_common.c file.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
a07e7dfaee pimd: Move "show ip pim bsrp-info [vrf] [json]" cmd to DEFPY
Added pim_show_group_rp_mappings_info_helper to suppport both PIM and
PIMV6.
pim_show_group_rp_mappings_info() is moved to pim_cmd_common.c file.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
0cb98fcd81 pim6d: Add "show ipv6 pim bsr [vrf NAME] [json] cmd"
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
aaf46b1edc pimd: Add vrf optional parameter in "show ip pim bsr" cmd
Added common API pim_show_bsr_helper to suppport both PIM and
PIMV6.
pim_show_bsr() is moved to pim_cmd_common.c file.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:48 -07:00
Sarita Patra
dfeda85c4b pim6d: Add [no] ipv6 pim unicast-bsm" command
Introduced common api pim_process_unicast_bsm_cmd,
pim_process_no_unicast_bsm_cmd which will process
both "[no] ip pim unicast-bsm" command and "[no] ipv6 pim
unicast-bsm" command.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:07:46 -07:00
Sarita Patra
5e651c3699 pim6d: Add [no] ipv6 pim bsm" command
Introduced common api pim_process_bsm_cmd,
pim_process_no_bsm_cmd which will process
both "[no] ip pim bsm" command and "[no] ipv6 pim
bsm" command.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-10-20 01:06:30 -07:00
Donatas Abraitis
4ca122525d
Merge pull request #12144 from patrasar/v4-over-v6_nh
pimd: Fix v4-over-v6 nexthop handling
2022-10-20 10:06:55 +03:00
Lou Berger
0b242b118f topotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-19 18:34:34 +00:00
Lou Berger
20d26a9e08 ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-19 15:02:31 +00:00
Lou Berger
0b91fce78b ospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-19 11:50:41 +00:00
Donatas Abraitis
d2e0ef18b3
Merge pull request #12146 from rgirada/frr_gr
ospf6d: adding missing json fields
2022-10-19 10:10:50 +03:00
Philippe Guibert
6082fb4249 zebra: upon srte leave, flush sr policies
Upon srte leave, flush SR policies.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-10-19 08:40:01 +02:00
Russ White
1ef56168a6
Merge pull request #12124 from anlancs/ospfd-len
ospfd: pass the length of string to function
2022-10-18 11:40:21 -04:00
Carmine Scarpitta
537b8b13f9 zebra: Do not allow SRv6 func_bit_len > 20
Currently, the SID transposition algorithm implemented in bgpd handles
incorrectly the SRv6 locators with function length greater than 20 bits.
To prevent issues, we currently limit the function length to 20 bits.

This limit will be removed when the bgpd SID transposition is fixed.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-10-18 16:08:24 +02:00
Carmine Scarpitta
34e3711fb4 zebra: Ensure SRv6 SID length does not exceed 128
According to RFC 8986, the SRv6 SID length cannot exceed 128 bits. This
commit ensures that the condition
`block_len + node_len + function_len + arg_len <= 128` is satisfied when
a new SRv6 locator is created.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-10-18 16:08:24 +02:00
Carmine Scarpitta
b3c5e11c8d tests: Add tests for no sid vpn per-vrf export
This commit extends the `bgp_srv6l3vpn_to_bgp_vrf3` topotest by adding
two tests:
* prevent bgpd from exporting routes from a VRF to the VPN RIB
  (`no sid vpn per-vrf export`);
* enable bgpd to export routes from a VRF to the VPN RIB
  (`sid vpn per-vrf export auto`).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-10-18 16:08:24 +02:00
Carmine Scarpitta
e606d8ec84 bgpd: Add no sid vpn per-vrf export command
The command `sid vpn per-vrf export (1-255)|auto` can be used to export
IPv4 and IPv6 routes from a VRF to the VPN RIB using a single SRv6 SID
(End.DT46 behavior).

This commit implements the no form of the above command, which can be
used to disable the export of the IPv4/IPv6 routes:
`no sid vpn per-vrf export`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-10-18 16:08:24 +02:00
Carmine Scarpitta
2d8c098ada doc: add doc for "sid vpn per-vrf export" command
This command adds the documentation for the "sid vpn per-vrf export (1..255)|auto" command to bgpd.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-10-18 16:08:24 +02:00
Carmine Scarpitta
efc9b57d22 bgpd: add per-VRF SID to the bgpd configuration
This commit adds the per-VRF SID chosen to advertise L3VPN for IPv4 and IPv6 address families using a single SID to the bgpd configuration.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-10-18 16:08:24 +02:00