]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
15 months agoMerge pull request #15055 from opensourcerouting/fix/zebra_ipv6_ll_configured
Russ White [Tue, 2 Jan 2024 15:42:08 +0000 (10:42 -0500)]
Merge pull request #15055 from opensourcerouting/fix/zebra_ipv6_ll_configured

zebra: Push all configured IP addresses when the interface comes up

15 months agoMerge pull request #15062 from opensourcerouting/fix/mark_as_failed_if_do_not_merge_l...
Donald Sharp [Tue, 2 Jan 2024 15:38:34 +0000 (10:38 -0500)]
Merge pull request #15062 from opensourcerouting/fix/mark_as_failed_if_do_not_merge_labeled

github: Mark the build as failed if 'do not merge' label is set

15 months agoMerge pull request #12261 from cscarpitta/srv6-encap-src-addr
Russ White [Tue, 2 Jan 2024 15:37:34 +0000 (10:37 -0500)]
Merge pull request #12261 from cscarpitta/srv6-encap-src-addr

zebra: Add the support of the Source Addr param of the SRv6 Encapsulation

15 months agoMerge pull request #15070 from LabNConsulting/chopps/fix-coverity-errors
Donald Sharp [Tue, 2 Jan 2024 15:09:03 +0000 (10:09 -0500)]
Merge pull request #15070 from LabNConsulting/chopps/fix-coverity-errors

chopps/fix coverity errors

15 months agoMerge pull request #15071 from LabNConsulting/chopps/building-cleanup
Donald Sharp [Tue, 2 Jan 2024 15:07:10 +0000 (10:07 -0500)]
Merge pull request #15071 from LabNConsulting/chopps/building-cleanup

build: protobuf is required so update building docs

15 months agoMerge pull request #15073 from LabNConsulting/chopps/fix-yang-key-queries
Donald Sharp [Tue, 2 Jan 2024 15:06:22 +0000 (10:06 -0500)]
Merge pull request #15073 from LabNConsulting/chopps/fix-yang-key-queries

lib: fix specific entry queries

15 months agoMerge pull request #15076 from LabNConsulting/chopps/libyang-no-schema-node-key-guarantee
Donald Sharp [Tue, 2 Jan 2024 15:05:16 +0000 (10:05 -0500)]
Merge pull request #15076 from LabNConsulting/chopps/libyang-no-schema-node-key-guarantee

lib: don't count on scheme key nodes being first children

15 months agoMerge pull request #15075 from pguibert6WIND/pathd_metric_computed
Donald Sharp [Tue, 2 Jan 2024 15:04:40 +0000 (10:04 -0500)]
Merge pull request #15075 from pguibert6WIND/pathd_metric_computed

pathd: add dynamic candidate path metric [computed] keyword

15 months agolib: don't count on scheme key nodes being first children 15076/head
Christian Hopps [Tue, 2 Jan 2024 11:34:34 +0000 (11:34 +0000)]
lib: don't count on scheme key nodes being first children

Heard back from libyang folks that this is not something they consider part of
the API and/or are going to guarantee. So we cannot count on it. Expect keys at
any location on the child sibling list.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agopathd: add dynamic candidate path metric [computed] keyword 15075/head
Philippe Guibert [Tue, 2 Jan 2024 10:49:57 +0000 (11:49 +0100)]
pathd: add dynamic candidate path metric [computed] keyword

Add the 'computed' keyword for a given metric.

> [..]
> metric te computed

When set by the PCC, the PCE must send back a computed metric
value in the PCResponse value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
15 months agolib: fix specific entry queries 15073/head
Christian Hopps [Mon, 1 Jan 2024 09:04:19 +0000 (09:04 +0000)]
lib: fix specific entry queries

- fix key leaf queries
- fix specific list entry with non-key leaf top element

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15068 from chiragshah6/zdev
Donatas Abraitis [Tue, 2 Jan 2024 08:42:28 +0000 (10:42 +0200)]
Merge pull request #15068 from chiragshah6/zdev

bgpd: lttng tp add ethtag to macip zebra send

15 months agoMerge pull request #15066 from chiragshah6/mdev1
Donatas Abraitis [Tue, 2 Jan 2024 08:40:14 +0000 (10:40 +0200)]
Merge pull request #15066 from chiragshah6/mdev1

bgpd: revamp evpn debugs nexthop and l3vni

15 months agobuild: protobuf is required so update building docs 15071/head
Christian Hopps [Sat, 30 Dec 2023 22:40:07 +0000 (22:40 +0000)]
build: protobuf is required so update building docs

- recommend using libyang 2.1.128 but accept 2.0.0 for now.
- update ubuntu building doc to add GRPC section
- update ubuntu reference docker builds to match grpc doc change

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: mgmtd: increase soft-max msg size to 64K 15070/head
Christian Hopps [Sat, 30 Dec 2023 14:58:52 +0000 (14:58 +0000)]
lib: mgmtd: increase soft-max msg size to 64K

- remove unused mgmt client/server constants

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: fix coverity CID 1574981
Christian Hopps [Sat, 30 Dec 2023 14:38:49 +0000 (14:38 +0000)]
lib: fix coverity CID 1574981

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agomgmtd: fix coverity CID 1574980
Christian Hopps [Sat, 30 Dec 2023 14:34:44 +0000 (14:34 +0000)]
mgmtd: fix coverity CID 1574980

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: fix coverity CID 1574979
Christian Hopps [Sat, 30 Dec 2023 14:48:15 +0000 (14:48 +0000)]
lib: fix coverity CID 1574979

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agomgmtd: fix coverity CID 1574978
Christian Hopps [Sat, 30 Dec 2023 14:36:50 +0000 (14:36 +0000)]
mgmtd: fix coverity CID 1574978

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: fix coverity CID 1574977
Christian Hopps [Sat, 30 Dec 2023 15:58:40 +0000 (15:58 +0000)]
lib: fix coverity CID 1574977

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agoMerge pull request #14492 from LabNConsulting/oper-state
Igor Ryzhov [Fri, 29 Dec 2023 05:08:30 +0000 (07:08 +0200)]
Merge pull request #14492 from LabNConsulting/oper-state

oper state

16 months agotests: add mgmt_oper topotest 14492/head
Christian Hopps [Sun, 22 Oct 2023 09:23:43 +0000 (05:23 -0400)]
tests: add mgmt_oper topotest

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agotests: client testing
Christian Hopps [Tue, 28 Nov 2023 19:25:22 +0000 (14:25 -0500)]
tests: client testing

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: fixes required after rebasing
Christian Hopps [Sat, 9 Dec 2023 04:49:10 +0000 (23:49 -0500)]
lib: fixes required after rebasing

lib: fix checkpatch warnings
lib: darr: disable check
mgmtd: fix initialization

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agozebra: fix cleanup of mgmt backend state
Christian Hopps [Wed, 1 Nov 2023 13:08:24 +0000 (09:08 -0400)]
zebra: fix cleanup of mgmt backend state

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agozebra: fix oper-state walk bug
Christian Hopps [Sun, 22 Oct 2023 11:28:13 +0000 (07:28 -0400)]
zebra: fix oper-state walk bug

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agozebra: support yielding between oper state routes query
Christian Hopps [Fri, 20 Oct 2023 08:53:05 +0000 (04:53 -0400)]
zebra: support yielding between oper state routes query

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agozebra: add zebra to mgmtd oper-state
Christian Hopps [Tue, 3 Oct 2023 21:53:11 +0000 (17:53 -0400)]
zebra: add zebra to mgmtd oper-state

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: add dedicated API functions for native msgs
Christian Hopps [Wed, 13 Dec 2023 22:32:43 +0000 (17:32 -0500)]
lib: add dedicated API functions for native msgs

- reorg native message header

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: northbound: add yielding and batching to oper-state queries
Christian Hopps [Mon, 30 Oct 2023 09:09:19 +0000 (05:09 -0400)]
lib: northbound: add yielding and batching to oper-state queries

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: darr: add ability to set MTYPE for dynamic arrays
Christian Hopps [Sat, 16 Dec 2023 22:17:39 +0000 (17:17 -0500)]
lib: darr: add ability to set MTYPE for dynamic arrays

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: yang: add yang_get_node_keys() function
Christian Hopps [Tue, 26 Dec 2023 12:50:42 +0000 (07:50 -0500)]
lib: yang: add yang_get_node_keys() function

- comment out unused mem-leaking function.
- improve yang_dnode_get_path return type

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agotools: add more libyang iter macros to .clang-format
Christian Hopps [Tue, 31 Oct 2023 09:26:16 +0000 (05:26 -0400)]
tools: add more libyang iter macros to .clang-format

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: create and use libyang tree during oper-state walk
Christian Hopps [Sat, 14 Oct 2023 02:51:11 +0000 (22:51 -0400)]
lib: create and use libyang tree during oper-state walk

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: northbound: improve xpath functionality
Christian Hopps [Tue, 10 Oct 2023 08:28:07 +0000 (04:28 -0400)]
lib: northbound: improve xpath functionality

Allow user to leave keys off of a list entry node at the end of the xpath. This
will return all list entries. Previously there was no way to just get the list
entries. One had to leave off the last list entry node which would then return
all list nodes as well as all the siblings at the same level.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: yang: add new functions
Christian Hopps [Fri, 20 Oct 2023 12:20:44 +0000 (08:20 -0400)]
lib: yang: add new functions

- yang_get_key_preds
- yang_lyd_new_list

A function like new_list was added recently to libyang,
this is a compat version.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: darr: add new access and str functions
Christian Hopps [Mon, 16 Oct 2023 10:26:34 +0000 (06:26 -0400)]
lib: darr: add new access and str functions

- darr_last(), and darr_strdup_cap().
- strcat, strdup, strlen, strnul equivs.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agotests: add debugs and count in static_simple test
Christian Hopps [Fri, 27 Oct 2023 05:14:56 +0000 (01:14 -0400)]
tests: add debugs and count in static_simple test

Also add option to use unified config.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agomgmtd: step 6: remove old unfinished get-data code
Christian Hopps [Tue, 10 Oct 2023 00:52:54 +0000 (20:52 -0400)]
mgmtd: step 6: remove old unfinished get-data code

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agomgmtd: step 5: add get-tree txn functionality
Christian Hopps [Fri, 7 Jul 2023 03:23:24 +0000 (23:23 -0400)]
mgmtd: step 5: add get-tree txn functionality

Adds the guts of the get-tree functionality that is called by or calls
the FE and BE code for get-tree processing.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agomgmtd: step 4: FE adapter get-tree functionality
Christian Hopps [Fri, 7 Jul 2023 05:01:57 +0000 (01:01 -0400)]
mgmtd: step 4: FE adapter get-tree functionality

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agomgmtd: step 3: BE adapter native message handling
Christian Hopps [Fri, 7 Jul 2023 04:30:23 +0000 (00:30 -0400)]
mgmtd: step 3: BE adapter native message handling

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: step 2: mgmtd: BE client code for get-tree functionality
Christian Hopps [Mon, 30 Oct 2023 09:06:17 +0000 (05:06 -0400)]
lib: step 2: mgmtd: BE client code for get-tree functionality

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: step 1: mgmtd: add FE get-tree functionality
Christian Hopps [Mon, 30 Oct 2023 09:02:53 +0000 (05:02 -0400)]
lib: step 1: mgmtd: add FE get-tree functionality

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agobgpd: lttng tp add ethtag to macip zebra send 15068/head
Chirag Shah [Thu, 7 Sep 2023 22:43:43 +0000 (15:43 -0700)]
bgpd: lttng tp add ethtag to macip zebra send

Ticket:#3597393
Testing Done:

2023-09-08T17:33:03.731 frr_bgp:evpn_mac_ip_zsend {'action': 'add',
'vni': 1003, 'eth_tag': 968006412, 'mac': '00:02:00:00:00:40', 'ip': '',
'vtep': '27.0.0.16', 'esi': '00:00:00:00:00:00:00:00:00:00'}

Signed-off-by: Chirag Shah <chirag@nvidia.com>
16 months agobgpd: fix coverity warnings about evpn vpn variable
Mark Stapp [Wed, 7 Sep 2022 16:31:42 +0000 (12:31 -0400)]
bgpd: fix coverity warnings about evpn vpn variable

A few paths could see a vpn variable with a NULL value;
check and protect those paths.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
16 months agobgpd: revamp evpn debugs nexthop and l3vni 15066/head
Chirag Shah [Wed, 27 Dec 2023 01:36:49 +0000 (17:36 -0800)]
bgpd: revamp evpn debugs nexthop and l3vni

Add nexthop fied when import/unimport evpn route in vrf,
print bgp vrf instance name which contains "VRF" keyword.

Include pathcount which is list of paths linked to nexthop.

add and delete l3vni to keep symmetric "L3VNI" keyword as
used in other debug statements.

Ticket: #3671288
Testing Done:

2023/12/27 05:10:03.339616 BGP: [HPE1G-3H7F2] ... new pi VRF vrf2
dest 0x55663e8372c0 (l 2) pi 0x55663e8374d0 (l 1, f 0x4010) nh 6.0.0.1

2023/12/27 05:58:56.650116 BGP: [MC0JJ-7ZYQB] ... delete pi VRF vrf2
dest 0x55663e885110 (l 5) pi 0x55663e8851e0 (l 1, f 0x4098) nh 6.0.0.1

2023/12/27 05:10:03.339581 BGP: [P4TBX-3W31N] evpn VRF vrf2 nh
6.0.0.1 rmac 00:02:00:00:00:04 add to zebra

2023/12/27 06:13:12.685906 BGP: [SWSCZ-2Z6M4] evpn vrf VRF vrf1 nh
6.0.0.1 del to zebra

2023/12/27 05:10:03.339603 BGP: [Y2EAK-4N7FV] path 60.1.1.111/32 linked
to VRF vrf2 nh 6.0.0.1 pathcount 0

2023/12/27 05:58:56.650125 BGP: [GVE17-CSNTB] path 81.1.1.0/24 unlinked
from VRF vrf2 nh 6.0.0.1 pathcount 16

2023/12/27 05:08:10.108038 ZEBRA: [Q8ZEK-CT776] Send L3VNI ADD 104001
VRF vrf1 RMAC 00:04:ba:10:10:62 VRR 1c:34:da:19:59:62 local-ip 6.0.0.31
filter none to bgp

2023/12/27 05:08:26.043121 ZEBRA: [R43YF-2MKZ3] Send L3VNI DEL 104001
VRF vrf1 to bgp

Signed-off-by: Chirag Shah <chirag@nvidia.com>
16 months agolib: yang: add tree "printing" utility functions
Christian Hopps [Sun, 9 Jul 2023 09:51:20 +0000 (05:51 -0400)]
lib: yang: add tree "printing" utility functions

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agolib: add simplified native msg support
Christian Hopps [Thu, 6 Jul 2023 22:24:48 +0000 (18:24 -0400)]
lib: add simplified native msg support

This is intended to replace protobuf use in mgmtd.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agoMerge pull request #15063 from idryzhov/dev-doc-graphviz
Quentin Young [Sun, 24 Dec 2023 03:50:23 +0000 (22:50 -0500)]
Merge pull request #15063 from idryzhov/dev-doc-graphviz

doc: add graphiz dependency for dev docs

16 months agoMerge pull request #15053 from opensourcerouting/fix/drop_ipv6_address_configured
Igor Ryzhov [Fri, 22 Dec 2023 20:13:32 +0000 (22:13 +0200)]
Merge pull request #15053 from opensourcerouting/fix/drop_ipv6_address_configured

zebra: Drop ipv6_address_configured() function

16 months agodoc: add graphiz dependency for dev docs 15063/head
Igor Ryzhov [Fri, 22 Dec 2023 14:08:43 +0000 (16:08 +0200)]
doc: add graphiz dependency for dev docs

There's a graph in cli.rst that needs graphviz to be built.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
16 months agogithub: Mark the build as failed if 'do not merge' label is set 15062/head
Donatas Abraitis [Fri, 22 Dec 2023 08:29:52 +0000 (10:29 +0200)]
github: Mark the build as failed if 'do not merge' label is set

This prevents us from merging PRs marked as 'do not merge'.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #15059 from donaldsharp/generate_support_bundle_on_test_failure
Donatas Abraitis [Fri, 22 Dec 2023 07:32:32 +0000 (09:32 +0200)]
Merge pull request #15059 from donaldsharp/generate_support_bundle_on_test_failure

Generate support bundle on test failure

16 months agoMerge pull request #15060 from donaldsharp/keychain_free_no_i_really_mean_it
Donatas Abraitis [Fri, 22 Dec 2023 07:31:21 +0000 (09:31 +0200)]
Merge pull request #15060 from donaldsharp/keychain_free_no_i_really_mean_it

lib: Keychain.c was using free

16 months agolib: Keychain.c was using free 15060/head
Donald Sharp [Thu, 21 Dec 2023 22:01:56 +0000 (17:01 -0500)]
lib: Keychain.c was using free

This is a bit of a bummer that this slipped through
for so long.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Show IPv6 link-local interfaces under `show interface brief` output 15055/head
Donatas Abraitis [Thu, 21 Dec 2023 13:13:16 +0000 (15:13 +0200)]
zebra: Show IPv6 link-local interfaces under `show interface brief` output

Despite if it's managed by FRR or the kernel, show it. If the system has only
link-local addresses, we should show it unless it's a secondary one.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agotools: Add some more data to support bundles 15059/head
Donald Sharp [Thu, 21 Dec 2023 15:26:47 +0000 (10:26 -0500)]
tools: Add some more data to support bundles

The ipv[4|6] vpn tables in bgp were not being
gathered.  This would be useful for some situations

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agotests: Stop some warning messages on test runs
Donald Sharp [Thu, 21 Dec 2023 15:24:23 +0000 (10:24 -0500)]
tests: Stop some warning messages on test runs

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agotests: Auto generate support bundle when a test fails
Donald Sharp [Thu, 21 Dec 2023 15:22:22 +0000 (10:22 -0500)]
tests: Auto generate support bundle when a test fails

Tests can fail, let's be proactive and gather up a support
bundle when they fail.  It will help diagnose the problem
to some extent.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Show IPv6 link-local interfaces under `show interface` output
Donatas Abraitis [Thu, 21 Dec 2023 13:08:52 +0000 (15:08 +0200)]
zebra: Show IPv6 link-local interfaces under `show interface` output

Despite if it's managed by FRR or the kernel, show it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agozebra: Push all configured IP addresses when the interface comes up
Donatas Abraitis [Thu, 21 Dec 2023 12:25:19 +0000 (14:25 +0200)]
zebra: Push all configured IP addresses when the interface comes up

Let's say we this:

```
$ ip link set down dev r1-eth0
$ ip link set up dev r1-eth0
```

But at the same time we have this interface configured by the FRR too:

```
interface r1-eth0
 ipv6 address fe80:1::1/64
exit
```

We never re-add fe80:1::1/64, when the interface comes up, and we have a
strange situation where NHT stops working and other stuff depending on NHT
stops too (BGP peering, etc.).

Closes: https://github.com/FRRouting/frr/issues/15050
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agozebra: Drop ipv6_address_configured() function 15053/head
Donatas Abraitis [Thu, 21 Dec 2023 13:25:27 +0000 (15:25 +0200)]
zebra: Drop ipv6_address_configured() function

Not used.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #15047 from LabNConsulting/aceelindem/fix-opaque-functab-leak
Russ White [Wed, 20 Dec 2023 20:42:25 +0000 (15:42 -0500)]
Merge pull request #15047 from LabNConsulting/aceelindem/fix-opaque-functab-leak

ospfd: Fix opaque functab memory leak and opaque AS External LSA cleanup problems

16 months agoospfd: Fix opaque functab leak and opaque AS cleanup problems 15047/head
Acee [Tue, 19 Dec 2023 18:30:38 +0000 (13:30 -0500)]
ospfd: Fix opaque functab leak and opaque AS cleanup problems

   1. Fix ospf opaque LSA function table memory leak.
   2. Remove incorrect one-to-one association of OSPF info-per-type
      to function table (since there many be many).
   3. Fix a problem with opaque AS external cleanup that was exposed
      by #2.
   4. Fix LSA memory leak in ospf_opaque_type9_lsa_if_cleanup().

Signed-off-by: Acee <aceelindem@gmail.com>
16 months agoMerge pull request #15046 from FRRouting/revert-15002-bgp_evpn_label_no_delete
Russ White [Tue, 19 Dec 2023 16:42:04 +0000 (11:42 -0500)]
Merge pull request #15046 from FRRouting/revert-15002-bgp_evpn_label_no_delete

Revert "bgpd: When receiving a label, store it"

16 months agoRevert "bgpd: When receiving a label, store it" 15046/head
Donald Sharp [Tue, 19 Dec 2023 16:40:24 +0000 (11:40 -0500)]
Revert "bgpd: When receiving a label, store it"

16 months agoMerge pull request #15002 from donaldsharp/bgp_evpn_label_no_delete
Russ White [Tue, 19 Dec 2023 16:34:04 +0000 (11:34 -0500)]
Merge pull request #15002 from donaldsharp/bgp_evpn_label_no_delete

bgpd: When receiving a label, store it

16 months agoMerge pull request #15022 from opensourcerouting/fix/change_to_log.error
Donald Sharp [Mon, 18 Dec 2023 13:58:09 +0000 (08:58 -0500)]
Merge pull request #15022 from opensourcerouting/fix/change_to_log.error

tools: Use error log level when failing to execute commands via frr-reload.py

16 months agoMerge pull request #15036 from opensourcerouting/fix/use_constants_for_addpath_cap_length
Donald Sharp [Mon, 18 Dec 2023 13:54:39 +0000 (08:54 -0500)]
Merge pull request #15036 from opensourcerouting/fix/use_constants_for_addpath_cap_length

bgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value

16 months agoMerge pull request #15037 from opensourcerouting/fix/validate_send_receive_flags
Donald Sharp [Mon, 18 Dec 2023 13:54:22 +0000 (08:54 -0500)]
Merge pull request #15037 from opensourcerouting/fix/validate_send_receive_flags

bgpd: Validate Addpath capability flags per AF

16 months agoMerge pull request #15032 from leonshaw/fix/bgp-default-withdraw
Donatas Abraitis [Mon, 18 Dec 2023 10:39:51 +0000 (12:39 +0200)]
Merge pull request #15032 from leonshaw/fix/bgp-default-withdraw

bgpd: "default-originate" shouldn't withdraw non-default routes

16 months agotests: Check for 0.0.0.0/1 in bgp_default_route 15032/head
Xiao Liang [Mon, 18 Dec 2023 06:57:22 +0000 (14:57 +0800)]
tests: Check for 0.0.0.0/1 in bgp_default_route

Ensure that 0.0.0.0/1 route can be advertised along with
default-originate.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
16 months agobgpd: Validate Addpath capability flags per AF 15037/head
Donatas Abraitis [Sun, 17 Dec 2023 13:13:57 +0000 (15:13 +0200)]
bgpd: Validate Addpath capability flags per AF

Send/Receive:
         This field indicates whether the sender is (a) able to receive
         multiple paths from its peer (value 1), (b) able to send
         multiple paths to its peer (value 2), or (c) both (value 3) for
         the <AFI, SAFI>.

         If any other value is received, then the capability SHOULD be
         treated as not understood and ignored [RFC5492].

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #15035 from donaldsharp/more_frr_memory_leaks_on_shutdown
Donatas Abraitis [Sun, 17 Dec 2023 10:04:47 +0000 (12:04 +0200)]
Merge pull request #15035 from donaldsharp/more_frr_memory_leaks_on_shutdown

More frr memory leaks on shutdown

16 months agobgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value 15036/head
Donatas Abraitis [Sun, 17 Dec 2023 10:03:36 +0000 (12:03 +0200)]
bgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agonhrpd: Cleanup a hash on nhrp shutdown 15035/head
Donald Sharp [Sat, 16 Dec 2023 14:29:00 +0000 (09:29 -0500)]
nhrpd: Cleanup a hash on nhrp shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agolib, bgpd, nhrpd: Cleanup memory in lib/resolver on shutdown
Donald Sharp [Sat, 16 Dec 2023 14:18:41 +0000 (09:18 -0500)]
lib, bgpd, nhrpd: Cleanup memory in lib/resolver on shutdown

This memory was not being cleaned up on shutdown.  Fix this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobgpd: "default-originate" shouldn't withdraw non-default routes
Xiao Liang [Fri, 15 Dec 2023 10:27:39 +0000 (18:27 +0800)]
bgpd: "default-originate" shouldn't withdraw non-default routes

Prevent "default-originate" from withdrawing non-default routes like
0.0.0.0/1 by checking prefix length.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
16 months agoMerge pull request #15015 from donaldsharp/test_ospf_suppress_fa_cleanup
Donatas Abraitis [Fri, 15 Dec 2023 05:01:27 +0000 (07:01 +0200)]
Merge pull request #15015 from donaldsharp/test_ospf_suppress_fa_cleanup

tests: ospf_suppress_fa sleeps, convert to run_and_expect

16 months agoMerge pull request #15023 from opensourcerouting/fix/drop_redundant_vrf_name
Donald Sharp [Fri, 15 Dec 2023 01:26:52 +0000 (20:26 -0500)]
Merge pull request #15023 from opensourcerouting/fix/drop_redundant_vrf_name

bgpd: Drop redundant VRF name printing for `show bgp summary`

16 months agoMerge pull request #15025 from donaldsharp/dplane_fpm_nl_wedgied
Mark Stapp [Thu, 14 Dec 2023 21:52:59 +0000 (16:52 -0500)]
Merge pull request #15025 from donaldsharp/dplane_fpm_nl_wedgied

zebra: Prevent possible wedged fpm write

16 months agoMerge pull request #15026 from Orange-OpenSource/ospf-te
Donald Sharp [Thu, 14 Dec 2023 21:16:34 +0000 (16:16 -0500)]
Merge pull request #15026 from Orange-OpenSource/ospf-te

ospfd: Correct LSA parser which fulfill the TED

16 months agotests: Update OSPF TE topotests 15026/head
Olivier Dugeon [Thu, 14 Dec 2023 17:34:38 +0000 (18:34 +0100)]
tests: Update OSPF TE topotests

The OSPF TE topotest is using switches to interconnect router. During the test,
interfaces are shutdown on some routers to simulate link failure and check that
the TED is correctly updated. However, the switche between router avoid the
detection by the neighbor router that the interface is down i.e. the interface
line remains up as it is conneted to the switch and not to the router.

This patch update the tested topology by removing the switch and connect
directly the router excepted the inter AS link on R3. Interface are also
renamed accordingly.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
16 months agoospfd: Correct LSA parser which fulfill the TED
Olivier Dugeon [Thu, 14 Dec 2023 17:22:32 +0000 (18:22 +0100)]
ospfd: Correct LSA parser which fulfill the TED

Traffic Engineering Database (TED) is fulfill from the various LSA advertised
and received by the router. To remove information on the TED, 2 mechanisms are
used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of
prefixes advertised in the Router LSA with the list of corresponding edges and
subnets contained in the TED. However, this second mechanism assumes that the
Router LSA is unique and contains all prefixes of the advertised router.
But, this is wrong. Prefixes could be advertised with several Router LSA.
This conduct to remove edge and subnet in the TED while it should be maintained.
The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy
loaded.

This simple patch removed deletion of edges and subnets when parsing the Router
LSA and only removed them when the corresponding TE Opaque LSA is flushed. In
addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This
patch also correct this second problem.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
16 months agotests: ospf_suppress_fa sleeps, convert to run_and_expect 15015/head
Donald Sharp [Wed, 13 Dec 2023 17:05:25 +0000 (12:05 -0500)]
tests: ospf_suppress_fa sleeps, convert to run_and_expect

The test_ospf_suppres_fa.py script is using straight
up sleeps before testing that the next step worked properly.
On a unloaded test system this will work 100% of the time
on a loaded test system this will have random failures.
Convert the test to use run_and_expect and give each
section of the test 30 seconds to get to the next state
appropriately instead of 10.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Use event_add_event instead of _timer 15025/head
Donald Sharp [Thu, 14 Dec 2023 14:14:00 +0000 (09:14 -0500)]
zebra: Use event_add_event instead of _timer

The t_dequeue was being enqueued with a timer of 0
this is really an event instead of a timer.  Let's
use that instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Prevent possible wedged fpm write
Donald Sharp [Thu, 14 Dec 2023 13:19:36 +0000 (08:19 -0500)]
zebra: Prevent possible wedged fpm write

An operator is reporting that the dplane_fpm_nl connection has
started to accumulate contexts.  One such path that could cause
this is that the obuf used is full and stays full.  This would
imply that what ever is on the receiving end has gotten wedged
and is not reading from the stream of data being sent it's way.
If after 15 seconds of no response, let's declare the connection
dead and reset it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Fetch actual SRv6 encap src addr on startup 12261/head
Carmine Scarpitta [Thu, 7 Dec 2023 17:31:37 +0000 (18:31 +0100)]
zebra: Fetch actual SRv6 encap src addr on startup

When zebra is started, someone may have configured an SRv6 encap source
address different from the default address ( :: ) in the kernel.

On startup, zebra should not assume that the actual SRv6 encap source
address is the default address ( :: ), but should retrieve the actual
source address from the kernel and put it in zebra configuration. In
other words, on startup we expect the actual SRv6 encap source
address and the configured one to be the same.

This commit makes the necessary changes to support the above.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
16 months agodoc: Add doc for `show segment-routing srv6 manager`
Carmine Scarpitta [Thu, 3 Nov 2022 11:44:50 +0000 (12:44 +0100)]
doc: Add doc for `show segment-routing srv6 manager`

The `show segment-routing srv6 manager` CLI command allows users to
print the SRv6 information. Currently, the SRv6 information includes
only the SRv6 encapsulation source address.

In this commit, we add the documentation for the
`show segment-routing srv6` command.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agodoc: Add doc for SRv6 encapsulation source address
Carmine Scarpitta [Thu, 3 Nov 2022 07:31:19 +0000 (08:31 +0100)]
doc: Add doc for SRv6 encapsulation source address

Add documentation for the new SRv6 encapsulation source address feature.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agotests: Add topotests for SRv6 encap source address
Carmine Scarpitta [Wed, 12 Oct 2022 22:51:56 +0000 (00:51 +0200)]
tests: Add topotests for SRv6 encap source address

Add a new topotest `srv6_encap_src_addr` which verifies that the
`source-address` command works properly.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra: Add encap source address to SRv6 config write function
Carmine Scarpitta [Mon, 5 Sep 2022 17:23:54 +0000 (19:23 +0200)]
zebra: Add encap source address to SRv6 config write function

When writing the SRv6 config from zebra, we must also include the source
address of outer encapsulating IPv6 header.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra: Add CLI command to verify SRv6 Manager
Carmine Scarpitta [Fri, 4 Nov 2022 18:28:04 +0000 (19:28 +0100)]
zebra: Add CLI command to verify SRv6 Manager

Add a new CLI command `show segment-routing srv6 manager [json]` to
verify the overall SRv6 state. The current output displays only the
configured source address of outer encapsulating IPv6 header. The output
can be extended in the future to show more information, including
summary SRv6 information and supported capabilities.

Example:

```
r1# show segment-routing srv6 manager
Parameters:
  Encapsulation:
    Source Address:
      Configured: fc00:0:1::1

r1# show segment-routing srv6 manager json
{
  "parameters":{
    "encapsulation":{
      "sourceAddress":{
        "configured":"fc00:0:1::1"
      }
    }
  }
}
```

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra, lib, vtysh: Add CLI cmd to set/unset SRv6 encap source address
Carmine Scarpitta [Thu, 3 Nov 2022 07:40:23 +0000 (08:40 +0100)]
zebra, lib, vtysh: Add CLI cmd to set/unset SRv6 encap source address

- Add a new node `SRV6_ENCAP_NODE` to the CLI graph. This node allows
users to configure encapsulation parameters for SRv6, including the
source address of the outer encapsulating IPv6 header.

- Install a new CLI command `source-address` under the
`SRV6_ENCAP_NODE` node. This command is used to configure the source
address of the outer encapsulating IPv6 header.

- Install a new CLI command `no source-address` under the
`SRV6_ENCAP_NODE` node. This command is used to unset the
source address of the outer encapsulating IPv6 header and restore the
default source address.

Examples:

```
router# segment-routing
router(sr)# srv6
router(srv6)# encapsulation
router(srv6-encap)# source-address fc00:0:1::1
```

```
router# segment-routing
router(sr)# srv6
router(srv6)# encapsulation
router(srv6-encap)# no source-address
```

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra: Add code to set SRv6 encap source addr in dplane
Carmine Scarpitta [Thu, 3 Nov 2022 15:23:51 +0000 (16:23 +0100)]
zebra: Add code to set SRv6 encap source addr in dplane

Add a bunch of set functions and associated data structure in
zebra_dplane to allow the configuration of the source address for SRv6
encap in the data plane.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra: Add function to resolve Generic Netlink family
Carmine Scarpitta [Thu, 3 Nov 2022 15:16:23 +0000 (16:16 +0100)]
zebra: Add function to resolve Generic Netlink family

Generic Netlink is an extension of Netlink meant for kernel-user space
communications. It supports the dynamic allocation of communication
channels. Kernel and user space applications register their services
with a Generic Netlink controller. The Generic Netlink controller is
responsible for assigning a unique channel number with each service.
Clients who want to use a service query the controller to see if
the service exists and to determine the correct channel number. The
channel number is used to access the requested service.

This commit adds the base functionality to get the channel number
assigned to a specific service. More precisely, this commit adds a
function `genl_resolve_family()` that takes the service name (called
family in the Generic Netlink terminology) as an input parameter and
queries the Generic Netlink controller to get the channel number
assigned with the requested service.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra: Add Generic Netlink socket
Carmine Scarpitta [Wed, 16 Nov 2022 23:15:40 +0000 (00:15 +0100)]
zebra: Add Generic Netlink socket

zebra already supports several Netlink sockets which allow it to
communicate with the kernel. Each Netlink socket has a specific purpose:
we have a socket for incoming events from the kernel, a socket for
programming the dataplane, a socket for the kernel messages, a socket
used as the command channel. All the currently supported sockets are
based on the `NETLINK_ROUTE` protocol.

This commit adds a new Netlink socket that allows zebra to send
commands to the kernel using the `Generic Netlink` protocol.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agozebra: Abstract the `netlink_socket()` API
Carmine Scarpitta [Wed, 16 Nov 2022 23:08:21 +0000 (00:08 +0100)]
zebra: Abstract the `netlink_socket()` API

The `netlink_socket()` function is used in many places to create and
initialize Netlink sockets. Currently, it can only create
`NETLINK_ROUTE` Netlink sockets.

This commit generalizes the behavior of the `netlink_socket()` function,
enabling it to generate Netlink sockets of any type. Specifically, it
extends the `netlink_socket()` function with a new argument `nl_family`,
which allows developers to specify the Netlink family of the socket to
be created.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
16 months agoMerge pull request #14890 from louis-6wind/exabgp4
Martin Winter [Thu, 14 Dec 2023 13:46:24 +0000 (05:46 -0800)]
Merge pull request #14890 from louis-6wind/exabgp4

topotests: convert to exabgp 4 and python3