]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
19 months agobuild: exclude a few more things from frr.xref
David Lamparter [Wed, 26 Oct 2022 14:57:16 +0000 (15:57 +0100)]
build: exclude a few more things from frr.xref

... this might need some better approach long-term.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
19 months agopython: fix for old (< 3.6) Python versions
David Lamparter [Mon, 24 Oct 2022 14:55:01 +0000 (15:55 +0100)]
python: fix for old (< 3.6) Python versions

Sigh.  No type annotations, no f-strings.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
19 months agobuild: fix gRPC build dependencies
David Lamparter [Mon, 24 Oct 2022 14:49:10 +0000 (15:49 +0100)]
build: fix gRPC build dependencies

The generated header files need a dependency on the generated .c file,
otherwise build breaks when the header is used before it is generated.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
19 months agoisisd/fabricd: use PROTO_NAME in SR code
David Lamparter [Thu, 6 Oct 2022 14:04:03 +0000 (16:04 +0200)]
isisd/fabricd: use PROTO_NAME in SR code

The IS-IS SR code was missing a use of `PROTO_NAME`, making fabricd
collide with the isisd CLI command.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
19 months agoospfd, ospf6d: align CLI help strings
David Lamparter [Thu, 6 Oct 2022 14:03:23 +0000 (16:03 +0200)]
ospfd, ospf6d: align CLI help strings

ospfd and ospf6d define the same metric-type route-map commands.  Make
them have the same help string too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
19 months agobuild, vtysh: extract vtysh commands from .xref
David Lamparter [Tue, 4 Oct 2022 16:44:36 +0000 (18:44 +0200)]
build, vtysh: extract vtysh commands from .xref

Rather than running selected source files through the preprocessor and a
bunch of perl regex'ing to get the list of all DEFUNs, use the data
collected in frr.xref.

This not only eliminates issues we've been having with preprocessor
failures due to nonexistent header files, but is also much faster.
Where extract.pl would take 5s, this now finishes in 0.2s.  And since
this is a non-parallelizable build step towards the end of the build
(dependent on a lot of other things being done already), the speedup is
actually noticeable.

Also files containing CLI no longer need to be listed in `vtysh_scan`
since the .xref data covers everything.  `#ifndef VTYSH_EXTRACT_PL`
checks are equally obsolete.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
19 months agoMerge pull request #11673 from cscarpitta/srv6-per-vrf-sid
Donatas Abraitis [Mon, 24 Oct 2022 14:30:10 +0000 (17:30 +0300)]
Merge pull request #11673 from cscarpitta/srv6-per-vrf-sid

bgpd: add support for SRv6 L3VPN for IPv4 and IPv6 address families using a single SID

19 months agoMerge pull request #12026 from kuldeepkash/bgp_local_asn
Donatas Abraitis [Mon, 24 Oct 2022 06:16:59 +0000 (09:16 +0300)]
Merge pull request #12026 from kuldeepkash/bgp_local_asn

tests: Add bgp local asn test suite

19 months agoMerge pull request #12173 from sworleys/VNI-chrstr-Fix
Donatas Abraitis [Mon, 24 Oct 2022 05:59:17 +0000 (08:59 +0300)]
Merge pull request #12173 from sworleys/VNI-chrstr-Fix

bgpd: fix vni_str NULL check in evpn rt show run

19 months agoMerge pull request #12178 from opensourcerouting/fix/revert_13111667513a0f91a8e875cdf...
Donald Sharp [Sun, 23 Oct 2022 19:13:26 +0000 (15:13 -0400)]
Merge pull request #12178 from opensourcerouting/fix/revert_13111667513a0f91a8e875cdf12c940ea2b60b05

Revert "doc: Add `neighbor PEER extended-optional-parameters` command"

19 months agoRevert "doc: Add `neighbor PEER extended-optional-parameters` command"
Donatas Abraitis [Fri, 21 Oct 2022 18:45:29 +0000 (21:45 +0300)]
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 13111667513a0f91a8e875cdf12c940ea2b60b05.

19 months agobgpd: fix vni_str NULL check in evpn rt show run
Stephen Worley [Fri, 21 Oct 2022 15:18:12 +0000 (11:18 -0400)]
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>
19 months agoMerge pull request #12094 from patrasar/pimv6_rp_linklocal
Donatas Abraitis [Fri, 21 Oct 2022 07:34:28 +0000 (10:34 +0300)]
Merge pull request #12094 from patrasar/pimv6_rp_linklocal

pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP

19 months agoMerge pull request #11600 from patrasar/pimv6_bsm_clis
Donatas Abraitis [Fri, 21 Oct 2022 06:41:22 +0000 (09:41 +0300)]
Merge pull request #11600 from patrasar/pimv6_bsm_clis

pim6d:  BSM CLIs implementation

19 months agoMerge pull request #12140 from opensourcerouting/fix/watchfrr_dont_givup
Jafar Al-Gharaibeh [Fri, 21 Oct 2022 04:46:47 +0000 (23:46 -0500)]
Merge pull request #12140 from opensourcerouting/fix/watchfrr_dont_givup

watchfrr: Delay restart_kill if still reading configuration

19 months agoMerge pull request #12160 from donaldsharp/debug_nh_fix
Jafar Al-Gharaibeh [Fri, 21 Oct 2022 04:43:46 +0000 (23:43 -0500)]
Merge pull request #12160 from donaldsharp/debug_nh_fix

Debug nh fix

19 months agotests: Add lib changes to support bgp local asn feature
Kuldeep Kashyap [Tue, 27 Sep 2022 03:27:02 +0000 (08:57 +0530)]
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>
19 months agotests: Add bgp local asn test suite
Kuldeep Kashyap [Tue, 27 Sep 2022 03:25:28 +0000 (08:55 +0530)]
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>
19 months agoMerge pull request #12155 from LabNConsulting/working/lb/opaque-lsa-zero-len
Jafar Al-Gharaibeh [Thu, 20 Oct 2022 14:19:45 +0000 (09:19 -0500)]
Merge pull request #12155 from LabNConsulting/working/lb/opaque-lsa-zero-len

OSPF: allow for zero length opaque LSAs

19 months agolib: Remove unnecessary comparison, for linked list
Donald Sharp [Wed, 19 Oct 2022 16:57:28 +0000 (12:57 -0400)]
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>
19 months agozebra: Fix debug of filtering out prefix due to routemap
Donald Sharp [Wed, 19 Oct 2022 16:44:55 +0000 (12:44 -0400)]
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>
19 months agopimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP
Sarita Patra [Tue, 11 Oct 2022 01:38:14 +0000 (18:38 -0700)]
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>
19 months agopimd, pim6d: Define pim_addr_is_multicast API
Sarita Patra [Thu, 13 Oct 2022 04:37:28 +0000 (21:37 -0700)]
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>
19 months agopim6d: Update BSM cli/show/debug commands in pimv6.rst
Sarita Patra [Thu, 14 Jul 2022 12:11:51 +0000 (05:11 -0700)]
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>
19 months agopim6d: Add "show ipv6 pim bsrp-info [vrf NAME] [json]" cli
Sarita Patra [Tue, 12 Jul 2022 14:44:40 +0000 (07:44 -0700)]
pim6d: Add "show ipv6 pim bsrp-info [vrf NAME] [json]" cli

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopim6d: Add "[no] debug pimv6 bsm" cli
Sarita Patra [Tue, 12 Jul 2022 13:48:33 +0000 (06:48 -0700)]
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>
19 months agopim6d: Add "show ipv6 show ip pim bsm-database [vrf NAME] [json]" cli
Sarita Patra [Tue, 12 Jul 2022 13:43:10 +0000 (06:43 -0700)]
pim6d: Add "show ipv6 show ip pim bsm-database [vrf NAME] [json]" cli

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopimd: Move "show ip pim bsm-database" cmd to DEFPY
Sarita Patra [Tue, 12 Jul 2022 13:39:56 +0000 (06:39 -0700)]
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>
19 months agopimd: Move "show ip pim bsrp-info [vrf] [json]" cmd to DEFPY
Sarita Patra [Tue, 12 Jul 2022 14:15:07 +0000 (07:15 -0700)]
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>
19 months agopim6d: Add "show ipv6 pim bsr [vrf NAME] [json] cmd"
Sarita Patra [Tue, 12 Jul 2022 11:23:34 +0000 (04:23 -0700)]
pim6d: Add "show ipv6 pim bsr [vrf NAME] [json] cmd"

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopimd: Add vrf optional parameter in "show ip pim bsr" cmd
Sarita Patra [Tue, 12 Jul 2022 11:16:17 +0000 (04:16 -0700)]
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>
19 months agopim6d: Add [no] ipv6 pim unicast-bsm" command
Sarita Patra [Tue, 12 Jul 2022 10:49:48 +0000 (03:49 -0700)]
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>
19 months agopim6d: Add [no] ipv6 pim bsm" command
Sarita Patra [Tue, 12 Jul 2022 10:45:14 +0000 (03:45 -0700)]
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>
19 months agoMerge pull request #12144 from patrasar/v4-over-v6_nh
Donatas Abraitis [Thu, 20 Oct 2022 07:06:55 +0000 (10:06 +0300)]
Merge pull request #12144 from patrasar/v4-over-v6_nh

pimd: Fix v4-over-v6 nexthop handling

19 months agotopotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs
Lou Berger [Wed, 19 Oct 2022 13:07:02 +0000 (13:07 +0000)]
topotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
Lou Berger [Wed, 19 Oct 2022 11:52:30 +0000 (11:52 +0000)]
ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)
Lou Berger [Wed, 19 Oct 2022 11:50:41 +0000 (11:50 +0000)]
ospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoMerge pull request #12146 from rgirada/frr_gr
Donatas Abraitis [Wed, 19 Oct 2022 07:10:50 +0000 (10:10 +0300)]
Merge pull request #12146 from rgirada/frr_gr

ospf6d: adding missing json fields

19 months agoMerge pull request #12124 from anlancs/ospfd-len
Russ White [Tue, 18 Oct 2022 15:40:21 +0000 (11:40 -0400)]
Merge pull request #12124 from anlancs/ospfd-len

ospfd: pass the length of string to function

19 months agozebra: Do not allow SRv6 func_bit_len > 20
Carmine Scarpitta [Thu, 6 Oct 2022 15:26:57 +0000 (17:26 +0200)]
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>
19 months agozebra: Ensure SRv6 SID length does not exceed 128
Carmine Scarpitta [Tue, 23 Aug 2022 14:20:07 +0000 (16:20 +0200)]
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>
19 months agotests: Add tests for `no sid vpn per-vrf export`
Carmine Scarpitta [Tue, 23 Aug 2022 14:13:42 +0000 (16:13 +0200)]
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>
19 months agobgpd: Add `no sid vpn per-vrf export` command
Carmine Scarpitta [Tue, 23 Aug 2022 14:04:06 +0000 (16:04 +0200)]
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>
19 months agodoc: add doc for "sid vpn per-vrf export" command
Carmine Scarpitta [Sat, 23 Jul 2022 18:14:51 +0000 (20:14 +0200)]
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>
19 months agobgpd: add per-VRF SID to the bgpd configuration
Carmine Scarpitta [Sat, 23 Jul 2022 17:58:58 +0000 (19:58 +0200)]
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>
19 months agodoc: extend documentation of SRv6 locator
Carmine Scarpitta [Sat, 23 Jul 2022 16:48:42 +0000 (18:48 +0200)]
doc: extend documentation of SRv6 locator

This commit adds the documentation of the two optional parameters "block-len" and "node-len" of the SRv6 locator.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agodoc: add docs for End.DT46 seg6local route
Carmine Scarpitta [Sat, 23 Jul 2022 16:39:16 +0000 (18:39 +0200)]
doc: add docs for End.DT46 seg6local route

This commit adds the documentation for End.DT46 seg6local route to sharpd.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agotests: add new topotest to verify SRv6 locators
Carmine Scarpitta [Sat, 23 Jul 2022 16:30:03 +0000 (18:30 +0200)]
tests: add new topotest to verify SRv6 locators

This commit adds a new topotest to verify the functionality of SRv6
locators with custom bits length parameters.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agotests: add new topotest for SRv6-L3VPN (IPv4/IPv6)
Carmine Scarpitta [Sat, 23 Jul 2022 16:26:50 +0000 (18:26 +0200)]
tests: add new topotest for SRv6-L3VPN (IPv4/IPv6)

This commit adds a new topotest which tests SRv6 L3VPN for IPv4 and
IPv6 address families using a single SID.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agotests: add test for SRv6 End.DT46 behavior
Carmine Scarpitta [Sat, 23 Jul 2022 16:21:24 +0000 (18:21 +0200)]
tests: add test for SRv6 End.DT46 behavior

This commit adds a new test case to the
test_zebra_seg6local_route topotest. The new test case performs two
operations:
* try to install a seg6local route with an End.DT46 action
* verify that the route is created correctly

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agosharpd: add support for SRv6 End.DT46 behavior
Carmine Scarpitta [Sat, 23 Jul 2022 16:12:23 +0000 (18:12 +0200)]
sharpd: add support for SRv6 End.DT46 behavior

This commit adds the support for SRv6 End.DT46 behavior to SHARPD.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agobgpd: add SRv6 per-VRF SID to SRv6 details
Carmine Scarpitta [Sat, 23 Jul 2022 10:33:58 +0000 (12:33 +0200)]
bgpd: add SRv6 per-VRF SID to SRv6 details

This commit adds the SRv6 per-VRF SID to the output of "show bgp segment-routing srv6".

Output example:

[...]
bgps:
- name: default
  vpn_policy[AFI_IP].tovpn_sid: none
  vpn_policy[AFI_IP6].tovpn_sid: none
  per-vrf tovpn_sid: none
- name: Vrf10
  vpn_policy[AFI_IP].tovpn_sid: none
  vpn_policy[AFI_IP6].tovpn_sid: none
  per-vrf tovpn_sid: 2001:db8:1:1:100::
[...]

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agobgpd: add bits length params to the SRv6 details
Carmine Scarpitta [Sat, 23 Jul 2022 10:23:16 +0000 (12:23 +0200)]
bgpd: add bits length params to the SRv6 details

This commit adds "block-length", "node-length", "func-length" and
"arg-length" to the output of "show bgp segment-routing srv6".

Output example:

rose-srv6# show bgp segment-routing srv6
locator_name: loc1
locator_chunks:
- 2001:db8:1:1::/64
  block-length: 40
  node-length: 24
  func-length: 16
  arg-length: 0
[...]

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agobgpd: add support for per-VRF SRv6 SID
Carmine Scarpitta [Sat, 23 Jul 2022 09:49:56 +0000 (11:49 +0200)]
bgpd: add support for per-VRF SRv6 SID

In the current implementation of bgpd, SRv6 SIDs can be configured only
under the address-family. This enables bgpd to leak IPv6 routes using
an SRv6 End.DT6 behavior and IPv4 routes using an SRv6 End.DT4
behavior. It is not possible to leak both IPv6 and IPv4 routes using a
single SRv6 SID.

This commit adds a new CLI command
"sid vpn per-vrf export <sid_idx|auto>" that enables bgpd to leak both
IPv6 and IPv4 routes using a single SRv6 SID (End.DT46 behavior).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agolib: add block/node/arg len to SRv6 locator JSON
Carmine Scarpitta [Fri, 22 Jul 2022 23:59:06 +0000 (01:59 +0200)]
lib: add block/node/arg len to SRv6 locator JSON

This commit adds the SRv6 locator's block length, node length and
argument length to the output of the command
"show segment-routing srv6 locator json"

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: add missing bits len to SRv6 locator detail
Carmine Scarpitta [Fri, 22 Jul 2022 23:55:28 +0000 (01:55 +0200)]
zebra: add missing bits len to SRv6 locator detail

This commit adds SRv6 locator's block length, node length and argument
length to the output of the command
"show segment-routing srv6 locator NAME detail [json]".

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: add block/node/arg len to zebra sr config
Carmine Scarpitta [Fri, 22 Jul 2022 23:50:32 +0000 (01:50 +0200)]
zebra: add block/node/arg len to zebra sr config

This commit adds the SRv6 locator's block length, node length and
argument length to the SRv6 configuration.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra, lib: add support for SRv6 End.DT46 behavior
Carmine Scarpitta [Fri, 22 Jul 2022 23:32:04 +0000 (01:32 +0200)]
zebra, lib: add support for SRv6 End.DT46 behavior

This commit enables zebra to install End.DT46 nexthops into the Linux kernel.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoinclude: update seg6_local.h to latest kernel
Carmine Scarpitta [Fri, 22 Jul 2022 23:25:44 +0000 (01:25 +0200)]
include: update seg6_local.h to latest kernel

The seg6_local.h header has changed in the kernel. We need a recent
version of the header to support SRv6 End.DT46 behavior.

This commit pulls seg6_local.h header from the Linux kernel.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: add new CLI args "block-len" and "node-len"
Carmine Scarpitta [Fri, 22 Jul 2022 22:29:08 +0000 (00:29 +0200)]
zebra: add new CLI args "block-len" and "node-len"

In the current implementation, an SRv6 locator only supports the
following structure:
* node-len = 24
* block-len = prefix-len - 24
* function-len = <configurable>
* argument-len = 0

This commit adds two optional arguments to the locator_prefix CLI
command: "node-len" and "block-len". These arguments allows an user to
configure the block length and node length of a SRv6 locator according
to the following logic:
* the node-len + block-len = prefix-len constraint must always be
satisfied;
* if node-len and block-len are both omitted, they are calculated as in
the current implementation (for backward compatibility reasons)
* if node-len is omitted, its value is computed as
prefix-len - block-len
* if block-len is omitted, its value is computed as
prefix-len - node-len

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoMerge pull request #8647 from sworleys/DVNI-Config-Changes
Donatas Abraitis [Tue, 18 Oct 2022 11:17:04 +0000 (14:17 +0300)]
Merge pull request #8647 from sworleys/DVNI-Config-Changes

bgpd: EVPN D-VNI L3 RT Config Enhancements

19 months agoospf6d: adding missing json fields
rgirada [Tue, 18 Oct 2022 05:51:18 +0000 (05:51 +0000)]
ospf6d: adding missing json fields

Description:
Active GR count field is missing in json o/p
of 'show ipv6 ospf gr helper' command.

Issue: #12100

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
19 months agopimd: Fix v4-over-v6 nexthop handling
Sarita Patra [Mon, 17 Oct 2022 21:13:33 +0000 (14:13 -0700)]
pimd: Fix v4-over-v6 nexthop handling

In the current code, if_lookup_by_index()
is called for un-initialized ifindex value.

This issue is introduced after 11098 PR.

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agoMerge pull request #12136 from opensourcerouting/fix/drop_leftovers
Donald Sharp [Sun, 16 Oct 2022 19:21:01 +0000 (15:21 -0400)]
Merge pull request #12136 from opensourcerouting/fix/drop_leftovers

tools: Do not try creating /proc with install command

19 months agotools: Do not try creating /proc with install command
Donatas Abraitis [Fri, 14 Oct 2022 18:30:13 +0000 (21:30 +0300)]
tools: Do not try creating /proc with install command

Leftovers.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agoMerge pull request #12126 from cscarpitta/fix/add-missing-debug-guard-bgpd-srv6
Donatas Abraitis [Fri, 14 Oct 2022 07:12:56 +0000 (10:12 +0300)]
Merge pull request #12126 from cscarpitta/fix/add-missing-debug-guard-bgpd-srv6

bgpd: Add missing debug guard in SRv6 L3VPN code

19 months agoMerge pull request #12113 from donaldsharp/network_statement
Donatas Abraitis [Fri, 14 Oct 2022 07:12:18 +0000 (10:12 +0300)]
Merge pull request #12113 from donaldsharp/network_statement

bgpd: Allow `network XXX` to work with bgp suppress-fib-pending

19 months agoMerge pull request #12066 from opensourcerouting/cleanup-cli-xref
Donald Sharp [Thu, 13 Oct 2022 17:47:04 +0000 (13:47 -0400)]
Merge pull request #12066 from opensourcerouting/cleanup-cli-xref

*: clean up various CLI-related bits

19 months agobgpd: Add missing debug guard in SRv6 L3VPN code
Carmine Scarpitta [Thu, 13 Oct 2022 15:26:24 +0000 (17:26 +0200)]
bgpd: Add missing debug guard in SRv6 L3VPN code

This commit adds a missing debug guard in `ensure_vrf_tovpn_sid()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoMerge pull request #12115 from donaldsharp/ospf_unnumbered_showdown
Russ White [Thu, 13 Oct 2022 15:02:17 +0000 (11:02 -0400)]
Merge pull request #12115 from donaldsharp/ospf_unnumbered_showdown

ospfd: Allow unnumbered and numbered addresses to co-exist better

19 months agoMerge pull request #11980 from isabelladeleon12/set_overload_startup
Russ White [Thu, 13 Oct 2022 14:59:24 +0000 (10:59 -0400)]
Merge pull request #11980 from isabelladeleon12/set_overload_startup

isisd: Add support for set-overload on-startup

19 months agoospfd: pass the length of string to function
anlan_cs [Thu, 13 Oct 2022 13:25:37 +0000 (21:25 +0800)]
ospfd: pass the length of string to function

Fix CID 1526337: (SIZEOF_MISMATCH)

Needs to pass the correct length to the function.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
19 months agoMerge pull request #12116 from alexclewontin/snapcraft-arch
Donald Sharp [Thu, 13 Oct 2022 13:23:08 +0000 (09:23 -0400)]
Merge pull request #12116 from alexclewontin/snapcraft-arch

snapcraft: fix staging libssh on non-x86 arches

19 months agoMerge pull request #12121 from opensourcerouting/feature/tag_prs_with_conflicts
Donald Sharp [Thu, 13 Oct 2022 13:21:40 +0000 (09:21 -0400)]
Merge pull request #12121 from opensourcerouting/feature/tag_prs_with_conflicts

github: Add `conflicts`/`no_conflicts` labels for PRs

19 months agoMerge pull request #12122 from opensourcerouting/fix/use_install_instead_of_touch_cho...
Donald Sharp [Thu, 13 Oct 2022 12:58:25 +0000 (08:58 -0400)]
Merge pull request #12122 from opensourcerouting/fix/use_install_instead_of_touch_chown_combination

tools: Use `install` instead of `touch/chown` combination

19 months agotools: Use `install` instead of `touch/chown` combination
Donatas Abraitis [Mon, 10 Oct 2022 15:27:59 +0000 (18:27 +0300)]
tools: Use `install` instead of `touch/chown` combination

touch + chown can have a gap between the commands (or the second failed).

This could lead to unexpected permissions (root, instead of frr) for some
.conf files or directories.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agogithub: Add `conflicts`/`no_conflicts` labels for PRs
Donatas Abraitis [Thu, 13 Oct 2022 05:18:59 +0000 (08:18 +0300)]
github: Add `conflicts`/`no_conflicts` labels for PRs

Just to quickly identify which PRs needs attention on rebasing.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agoMerge pull request #12108 from donaldsharp/general_mayhem
Donatas Abraitis [Thu, 13 Oct 2022 05:08:27 +0000 (08:08 +0300)]
Merge pull request #12108 from donaldsharp/general_mayhem

General mayhem

19 months agoisisd: Add JSON object functions to save overload status between restarts.
Isabella de Leon [Wed, 12 Oct 2022 23:03:29 +0000 (16:03 -0700)]
isisd: Add JSON object functions to save overload status between restarts.

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
19 months agosnapcraft: fix staging libssh on non-x86 arches
Alex Lewontin [Wed, 12 Oct 2022 21:20:25 +0000 (17:20 -0400)]
snapcraft: fix staging libssh on non-x86 arches

Signed-off-by: Alex Lewontin <alex.lewontin@canonical.com>
19 months agoospfd: Allow unnumbered and numbered addresses to co-exist better
Donald Sharp [Wed, 12 Oct 2022 20:05:23 +0000 (16:05 -0400)]
ospfd: Allow unnumbered and numbered addresses to co-exist better

When forming a neighbor relationship on an interface, ospf is
currently evaluating unnumbered as highest priority, without
any consideration for if you have /32's and non /32's on the
interface.  Effectively if I have something like this:

int foo0
  ip address 192.168.119.1/24
!
router ospf
  network 0.0.0.0/0 area 0
!

ospf will form a neighbor on foo0 if it exists.  Now
suppose someone does this:

int foo0
  ip address 192.168.120.1/32

This will create the unnumbered interface on foo0 and
the peering will come down immediately.

The problem here is that the original designers of the unnumbered
code for ospf didn't envision end operators mixing and matching
addresses on an interface like this ( for perfectly legitimate
reasons I might add ).

So if ospf has both numbered and unnumbered let's match against
the numbered first and then unnumbered.  This solves the problem

Fixes: #6823
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agoMerge pull request #12053 from opensourcerouting/feature/accept_own_extended_communit...
Russ White [Wed, 12 Oct 2022 19:58:23 +0000 (15:58 -0400)]
Merge pull request #12053 from opensourcerouting/feature/accept_own_extended_community_single_rr

bgpd: Implement ACCEPT_OWN extended community

19 months agobgpd: Allow `network XXX` to work with bgp suppress-fib-pending
Donald Sharp [Wed, 12 Oct 2022 18:53:21 +0000 (14:53 -0400)]
bgpd: Allow `network XXX` to work with bgp suppress-fib-pending

When bgp is using `bgp suppress-fib-pending` and the end
operator is using network statements, bgp was not sending
the network'ed prefix'es to it's peers.  Fix this.

Also update the test cases for bgp_suppress_fib to test
this new corner case( I am sure that there are going to
be others that will need to be added ).

Fixes: #12112
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agoisisd: Add expected behavior with set-overload-bit
Isabella de Leon [Wed, 12 Oct 2022 17:52:27 +0000 (10:52 -0700)]
isisd: Add expected behavior with set-overload-bit

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
19 months agobgpd: Implement ACCEPT_OWN extended community
Donatas Abraitis [Sun, 18 Sep 2022 19:18:13 +0000 (22:18 +0300)]
bgpd: Implement ACCEPT_OWN extended community

TL;DR: rfc7611.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agoMerge pull request #11159 from maduri111/bgpd-orr
Russ White [Wed, 12 Oct 2022 13:30:36 +0000 (09:30 -0400)]
Merge pull request #11159 from maduri111/bgpd-orr

bgpd: optimal route reflection

19 months agoMerge pull request #12059 from achernavin22/fix-max-med-on-startup
Donatas Abraitis [Wed, 12 Oct 2022 13:19:06 +0000 (16:19 +0300)]
Merge pull request #12059 from achernavin22/fix-max-med-on-startup

bgpd: fix "bgp max-med on-startup"

19 months agoMerge pull request #11981 from proelbtn/add-support-to-change-function-length
Russ White [Wed, 12 Oct 2022 12:44:29 +0000 (08:44 -0400)]
Merge pull request #11981 from proelbtn/add-support-to-change-function-length

bgpd: Add support to change Segment Routing function length

19 months agoMerge pull request #12105 from opensourcerouting/fix/bgp_list_sequence_handling_frr...
Donald Sharp [Wed, 12 Oct 2022 11:41:56 +0000 (07:41 -0400)]
Merge pull request #12105 from opensourcerouting/fix/bgp_list_sequence_handling_frr-reload

tools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py

19 months agozebra: Cleanup memory leaks on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:26:42 +0000 (16:26 -0400)]
zebra: Cleanup memory leaks on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agoripngd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:44 +0000 (16:21 -0400)]
ripngd: Cleanup memory allocations on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agoripd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:30 +0000 (16:21 -0400)]
ripd: Cleanup memory allocations on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agozebra: zrouter.mh_info is leaked on shutdown
Donald Sharp [Tue, 11 Oct 2022 19:22:04 +0000 (15:22 -0400)]
zebra: zrouter.mh_info is leaked on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agolib: Free some memory in scripting subsystem at shutdown
Donald Sharp [Tue, 11 Oct 2022 17:21:03 +0000 (13:21 -0400)]
lib: Free some memory in scripting subsystem at shutdown

Pre:
staticd: showing active allocations in memory group libfrr
staticd: memstats:  Scripting                     :     16 * (variably sized)
staticd: memstats:  Hash                          :      2 * (variably sized)
staticd: memstats:  Hash Bucket                   :      8 *         32
staticd: memstats:  Hash Index                    :      1 * (variably sized)
staticd: memstats:  Link List                     :      1 *         40
staticd: memstats:  Link Node                     :      1 *         24
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Post:
staticd: showing active allocations in memory group libfrr
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agostaticd: Clean up zclient on shutdown
Donald Sharp [Tue, 11 Oct 2022 16:57:57 +0000 (12:57 -0400)]
staticd: Clean up zclient on shutdown

The zclient data structure was not being cleaned up on shutdown.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agobgpd: code review comments addressed
Madhuri Kuruganti [Tue, 11 Oct 2022 13:29:37 +0000 (18:59 +0530)]
bgpd: code review comments addressed

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
19 months agobgpd, ospfd: update BGP when routes are removed from OSPF routing table
Madhuri Kuruganti [Sun, 18 Sep 2022 22:23:20 +0000 (03:53 +0530)]
bgpd, ospfd: update BGP when routes are removed from OSPF routing table

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
19 months agobgpd: fix for crash when no neighbor A.B.C.D remote-as AS_NUM with orr config
Madhuri Kuruganti [Sun, 18 Sep 2022 15:45:03 +0000 (21:15 +0530)]
bgpd: fix for crash when no neighbor A.B.C.D remote-as AS_NUM with orr config

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
19 months agoospfd: few fixes in rSPF calc when LSA received from non root node
Madhuri Kuruganti [Mon, 12 Sep 2022 14:27:20 +0000 (19:57 +0530)]
ospfd: few fixes in rSPF calc when LSA received from non root node

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
19 months agobgpd, ospfd: BGP ORR CI warning fixes
Madhuri Kuruganti [Sun, 4 Sep 2022 15:11:07 +0000 (20:41 +0530)]
bgpd, ospfd: BGP ORR CI warning fixes

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>