]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
18 months agozebra: add RTM_xxxCHAIN message codes, ignore 14577/head
Mark Stapp [Thu, 12 Oct 2023 13:59:44 +0000 (09:59 -0400)]
zebra: add RTM_xxxCHAIN message codes, ignore

We may receive some xxxCHAIN netlink messages, but we ignore
them (currently). Add them to the basic handler callback so
that we don't log errors about them.

Signed-off-by: Mark Stapp <mjs@labn.net>
18 months agoMerge pull request #14559 from opensourcerouting/feature/update_dev_versions_for_packages
Donald Sharp [Wed, 11 Oct 2023 15:34:57 +0000 (11:34 -0400)]
Merge pull request #14559 from opensourcerouting/feature/update_dev_versions_for_packages

packaging: Increase development version for debian/redhat stuff

18 months agoMerge pull request #14564 from opensourcerouting/fix/mgmtd_vty_port
Donald Sharp [Wed, 11 Oct 2023 15:33:50 +0000 (11:33 -0400)]
Merge pull request #14564 from opensourcerouting/fix/mgmtd_vty_port

mgmtd: Change MGMTD_VTY_PORT to 2623

18 months agoMerge pull request #14537 from opensourcerouting/feature/bgpd_aod
Russ White [Wed, 11 Oct 2023 14:22:26 +0000 (10:22 -0400)]
Merge pull request #14537 from opensourcerouting/feature/bgpd_aod

bgpd: Implement EBGP-OAD peering type

18 months agoMerge pull request #14557 from volodymyrhuti/EIGRP_IF_DELETE_CRASH
Russ White [Wed, 11 Oct 2023 14:17:54 +0000 (10:17 -0400)]
Merge pull request #14557 from volodymyrhuti/EIGRP_IF_DELETE_CRASH

eigrp: use correct memory pool on interface deletion

18 months agoMerge pull request #14528 from opensourcerouting/feature/bgpd_handle_addpath_capabili...
Russ White [Wed, 11 Oct 2023 14:16:18 +0000 (10:16 -0400)]
Merge pull request #14528 from opensourcerouting/feature/bgpd_handle_addpath_capability_via_dynamic_capability

bgpd: Handle Addpath capability using dynamic capabilities

18 months agoMerge pull request #14437 from opensourcerouting/issue/14004
Mark Stapp [Wed, 11 Oct 2023 11:23:41 +0000 (07:23 -0400)]
Merge pull request #14437 from opensourcerouting/issue/14004

vtysh freezed on ospf 'no network' command when there are multiple networks and interfaces

18 months agoMerge pull request #14563 from opensourcerouting/fix/cpuwarning_starvation
Donald Sharp [Wed, 11 Oct 2023 11:21:43 +0000 (07:21 -0400)]
Merge pull request #14563 from opensourcerouting/fix/cpuwarning_starvation

lib: Suppress HOB/STARVATION warnings when running in vtysh

18 months agoMerge pull request #14554 from donaldsharp/bgp_fifo
Donatas Abraitis [Wed, 11 Oct 2023 10:31:04 +0000 (13:31 +0300)]
Merge pull request #14554 from donaldsharp/bgp_fifo

bgpd: Convert the bgp_advertise_attr->adv to a fifo

18 months agomgmtd: Change MGMTD_VTY_PORT to 2623 14564/head
Donatas Abraitis [Wed, 11 Oct 2023 10:27:28 +0000 (13:27 +0300)]
mgmtd: Change MGMTD_VTY_PORT to 2623

This is clashing with PIMv6 (2622).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agolib: Suppress HOB/STARVATION warnings when running in vtysh 14563/head
Donatas Abraitis [Mon, 9 Oct 2023 09:03:50 +0000 (12:03 +0300)]
lib: Suppress HOB/STARVATION warnings when running in vtysh

Running ping/traceroute/etc. (any kind of commands that use execute_command()
suffer with this kind of warnings.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agoMerge pull request #14560 from donaldsharp/linkstate_reversal
Donatas Abraitis [Wed, 11 Oct 2023 05:01:46 +0000 (08:01 +0300)]
Merge pull request #14560 from donaldsharp/linkstate_reversal

Linkstate reversal

18 months agodebian: Increase version for development version to be 9.2 14559/head
Donatas Abraitis [Tue, 10 Oct 2023 16:53:50 +0000 (19:53 +0300)]
debian: Increase version for development version to be 9.2

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agoredhat: Update frr.spec file with older releases and increase current version
Donatas Abraitis [Tue, 10 Oct 2023 16:50:10 +0000 (19:50 +0300)]
redhat: Update frr.spec file with older releases and increase current version

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agoRevert "lib: register bgp link-state afi/safi" 14560/head
Donald Sharp [Tue, 10 Oct 2023 20:45:57 +0000 (16:45 -0400)]
Revert "lib: register bgp link-state afi/safi"

This reverts commit 1642a68d60cfade4b2fce72aaef58dea700c65c3.

18 months agoRevert "yang: add bgp link-state"
Donald Sharp [Tue, 10 Oct 2023 20:45:45 +0000 (16:45 -0400)]
Revert "yang: add bgp link-state"

This reverts commit 3cf5ff27155138ad7b7bafd2e815ca1bba5744ea.

18 months agoRevert "bgpd: add bgp link-state address-family configuration context"
Donald Sharp [Tue, 10 Oct 2023 20:45:32 +0000 (16:45 -0400)]
Revert "bgpd: add bgp link-state address-family configuration context"

This reverts commit ae2f3bb5b4eed01df1f7a69c7710c9be519390f6.

18 months agoRevert "bgpd: accept bgp link-state capability"
Donald Sharp [Tue, 10 Oct 2023 20:45:24 +0000 (16:45 -0400)]
Revert "bgpd: accept bgp link-state capability"

This reverts commit 67fe40676eb4e2ca78a41ddd70887af09b29fd9d.

18 months agoRevert "lib: add link-state prefixes"
Donald Sharp [Tue, 10 Oct 2023 20:45:11 +0000 (16:45 -0400)]
Revert "lib: add link-state prefixes"

This reverts commit c8172af6825ad4b10e68b33b8edc22e6e2dc1524.

18 months agoRevert "bgpd: store bgp link-state prefixes"
Donald Sharp [Tue, 10 Oct 2023 20:45:00 +0000 (16:45 -0400)]
Revert "bgpd: store bgp link-state prefixes"

This reverts commit 39a8d354c11f6f063fa5154f5807e7a0c9b04b46.

18 months agoRevert "bgpd: send bgp link-state prefixes"
Donald Sharp [Tue, 10 Oct 2023 20:44:51 +0000 (16:44 -0400)]
Revert "bgpd: send bgp link-state prefixes"

This reverts commit 0c94fb9cc853b3bcc98e8acca9fd03a036d33c92.

18 months agoRevert "bgpd, lib: extend the size of the prefix string buffer"
Donald Sharp [Tue, 10 Oct 2023 20:44:34 +0000 (16:44 -0400)]
Revert "bgpd, lib: extend the size of the prefix string buffer"

This reverts commit bdb3fa3b9216aede64c5b982011fb04ef25c67f7.

18 months agoRevert "bgpd: do not display vty output headers for link-state prefixes"
Donald Sharp [Tue, 10 Oct 2023 20:44:26 +0000 (16:44 -0400)]
Revert "bgpd: do not display vty output headers for link-state prefixes"

This reverts commit 3098772467ad8a46a8f35cdd4e502806740b2064.

18 months agoRevert "bgpd: display link-state prefixes detail"
Donald Sharp [Tue, 10 Oct 2023 20:44:11 +0000 (16:44 -0400)]
Revert "bgpd: display link-state prefixes detail"

This reverts commit 7e0d9ff8ba984966689562553afe2734b04c8539.

18 months agoRevert "bgpd: do not announce link-state routes to zebra"
Donald Sharp [Tue, 10 Oct 2023 20:43:59 +0000 (16:43 -0400)]
Revert "bgpd: do not announce link-state routes to zebra"

This reverts commit 39fb34275f827b3e1134549ed1731d74e72e6c79.

18 months agoRevert "bgpd: add bgp default link-state command"
Donald Sharp [Tue, 10 Oct 2023 20:43:48 +0000 (16:43 -0400)]
Revert "bgpd: add bgp default link-state command"

This reverts commit 38a7e20fc98ed750d9b2cdae1c79d1e19ceadcd3.

18 months agoRevert "bgpd: add show bgp link-state link-state commands"
Donald Sharp [Tue, 10 Oct 2023 20:43:38 +0000 (16:43 -0400)]
Revert "bgpd: add show bgp link-state link-state commands"

This reverts commit f11f67033fe20f0b4aeb6c885949abb060324749.

18 months agoRevert "bgpd: add linkstate debug"
Donald Sharp [Tue, 10 Oct 2023 20:43:28 +0000 (16:43 -0400)]
Revert "bgpd: add linkstate debug"

This reverts commit de38eada9c0527758bca34984d2f018670d74c9a.

18 months agoRevert "tests: add bgp_linkstate_topo1"
Donald Sharp [Tue, 10 Oct 2023 20:43:17 +0000 (16:43 -0400)]
Revert "tests: add bgp_linkstate_topo1"

This reverts commit a0e6cd4c8fb954f66546b056b0016b4ca7a0a430.

18 months agoRevert "doc: move bgp references at the right place"
Donald Sharp [Tue, 10 Oct 2023 20:43:07 +0000 (16:43 -0400)]
Revert "doc: move bgp references at the right place"

This reverts commit 709fe971fdd998687fdb9d1e36eca3fb9c8b3265.

18 months agoRevert "doc: add the bgp link-state user documentation"
Donald Sharp [Tue, 10 Oct 2023 20:42:58 +0000 (16:42 -0400)]
Revert "doc: add the bgp link-state user documentation"

This reverts commit 115f4f1dddb47a05c3e9454cc0fc88f34ebeb281.

18 months agoRevert "bgpd: store and send bgp link-state attributes"
Donald Sharp [Tue, 10 Oct 2023 20:42:47 +0000 (16:42 -0400)]
Revert "bgpd: store and send bgp link-state attributes"

This reverts commit 8b531b110756bf8627b5716f433190a0748b5e76.

18 months agoRevert "tests: add link-state attribute display in bgp_linkstate_topo1"
Donald Sharp [Tue, 10 Oct 2023 20:33:07 +0000 (16:33 -0400)]
Revert "tests: add link-state attribute display in bgp_linkstate_topo1"

This reverts commit 5727195cbf7d4c5ea63e307d553e039fa1f9e96f.

18 months agoRevert "doc: add information to display bgp-ls attributes"
Donald Sharp [Tue, 10 Oct 2023 20:32:55 +0000 (16:32 -0400)]
Revert "doc: add information to display bgp-ls attributes"

This reverts commit 8074d6f438bfb6c0cc98626b54919ce10f190125.

18 months agoRevert "bgpd: do not check attr in bgp_packet_attribute"
Donald Sharp [Tue, 10 Oct 2023 20:31:28 +0000 (16:31 -0400)]
Revert "bgpd: do not check attr in bgp_packet_attribute"

This reverts commit eb9e2865116777661c44963769c1a5fed764b7f9.

18 months agoRevert "bgpd: fix illegal memory access in bgp_ls_tlv_check_size()"
Donald Sharp [Tue, 10 Oct 2023 20:31:01 +0000 (16:31 -0400)]
Revert "bgpd: fix illegal memory access in bgp_ls_tlv_check_size()"

This reverts commit dae5791c446cd18d8cda93a1e578fff2cd27be10.

18 months agoospfd: Fixing infinite loop when listing OSPF interfaces 14437/head
Rodrigo Nardi [Mon, 18 Sep 2023 20:40:35 +0000 (17:40 -0300)]
ospfd: Fixing infinite loop when listing OSPF interfaces

The problem was happening because the ospf->oiflist has this behaviour, each interface was removed and added at the end of the list in each ospf_network_run_subnet call, generation an infinite loop.
As a solution, a copy of the list was generated and we interacted with a fixed list.

Signed-off-by: Rodrigo Nardi <rnardi@netdef.org>
18 months agoRevert "bgpd: fix link_state_hash_cmp()"
Donald Sharp [Tue, 10 Oct 2023 17:31:19 +0000 (13:31 -0400)]
Revert "bgpd: fix link_state_hash_cmp()"

This reverts commit 25408c8dbf7d9e0149ceb2dcbd2058860ce4f6c5.

18 months agoRevert "bgpd: fix insecure data write with ip addresses"
Donald Sharp [Tue, 10 Oct 2023 17:31:13 +0000 (13:31 -0400)]
Revert "bgpd: fix insecure data write with ip addresses"

This reverts commit 54222f921305edbce74e81996e9303c0c6b03823.

18 months agoRevert "bgpd: fix insecure data write with area addresses"
Donald Sharp [Tue, 10 Oct 2023 17:31:06 +0000 (13:31 -0400)]
Revert "bgpd: fix insecure data write with area addresses"

This reverts commit 57d0dc565f6a99c3d61b9b67a40ad88a83773eb6.

18 months agoRevert "bgpd: fix printing link state ospf opaque data"
Donald Sharp [Tue, 10 Oct 2023 17:30:57 +0000 (13:30 -0400)]
Revert "bgpd: fix printing link state ospf opaque data"

This reverts commit e1333d12e0d3ba8a9a0ca914dc72d0908dea494e.

18 months agoeigrp: use correct memory pool on interface deletion 14557/head
Volodymyr Huti [Tue, 10 Oct 2023 16:10:18 +0000 (19:10 +0300)]
eigrp: use correct memory pool on interface deletion

Trying to delete an interface during the test test_eigrp_topo1.py triggers a crash.
```
EIGRP: abort+0x12b
EIGRP: _zlog_assert_failed+0x18c
EIGRP: mt_count_free+0x56
EIGRP: qfree+0x2e
EIGRP: eigrp_if_delete_hook+0x8c
EIGRP: hook_call_if_del+0x5f
EIGRP: if_delete_retain+0x1c
EIGRP: if_delete+0xfb
EIGRP: if_destroy_via_zapi+0x69
EIGRP: zclient_interface_delete+0x57
EIGRP: zclient_read+0x3d0
EIGRP: event_call+0xd8
EIGRP: frr_run+0x271
EIGRP: main+0x14b
EIGRP: __libc_start_main+0xf3
EIGRP: _start+0x2e
EIGRP: in thread zclient_read scheduled from lib/zclient.c:4514 zclient_event()
```

Signed-off-by: Volodymyr Huti <v.huti@vyos.io>
18 months agobuild: FRR 9.2 development version frr-9.2-dev
Donatas Abraitis [Tue, 10 Oct 2023 16:43:56 +0000 (19:43 +0300)]
build: FRR 9.2 development version

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agoMerge pull request #13617 from anlancs/fix/pimd-remove-pimreg-vrf mergify/bp/dev/9.1/pr-13617 base_9.1
mobash-rasool [Tue, 10 Oct 2023 16:40:24 +0000 (22:10 +0530)]
Merge pull request #13617 from anlancs/fix/pimd-remove-pimreg-vrf

pimd: Fix missing pimreg interface

18 months agoMerge pull request #14535 from opensourcerouting/fix/bgp_aggregate_stuff
Russ White [Tue, 10 Oct 2023 15:36:34 +0000 (11:36 -0400)]
Merge pull request #14535 from opensourcerouting/fix/bgp_aggregate_stuff

bgpd: Drop redundant assignment for aspath segment type and length

18 months agoMerge pull request #14515 from mjstapp/fix_nhg_intf_uninstall
Chirag Shah [Tue, 10 Oct 2023 15:30:55 +0000 (08:30 -0700)]
Merge pull request #14515 from mjstapp/fix_nhg_intf_uninstall

zebra: be more careful removing 'installed' flag from nhgs

18 months agoMerge pull request #14548 from raja-rajasekar/frr_dev1
Russ White [Tue, 10 Oct 2023 15:05:11 +0000 (11:05 -0400)]
Merge pull request #14548 from raja-rajasekar/frr_dev1

zebra: Prevent leaking ctx memory in err condition

18 months agoMerge pull request #14550 from Keelan10/fix-nexthop_group-leak
Donald Sharp [Tue, 10 Oct 2023 14:11:48 +0000 (10:11 -0400)]
Merge pull request #14550 from Keelan10/fix-nexthop_group-leak

zebra: Free nexthop_group

18 months agobgpd: Convert the bgp_advertise_attr->adv to a fifo 14554/head
Donald Sharp [Fri, 6 Oct 2023 16:48:38 +0000 (12:48 -0400)]
bgpd: Convert the bgp_advertise_attr->adv to a fifo

BGP is storing outgoing updates in a couple of different
fifo's.  This is to ensure proper packet packing of
all bgp_dests that happen to use the same attribute.

How it's all put together currently:  On initial update
BGP walks through all the bgp_dest's in a table.  For each
path being sent a bgp_advertise is created.  This bgp_advertise
is placed in fifo order on the bgp_synchronize->update queue.
The bgp_advertise has a pointer to the bgp_advertise_attr which
is associated iwth the actual attribute that is being sent to
it's peer.  In turn this bgp_advertise is placed in a fifo off
of the bgp_advertise_attr structure.  As such as we have paths
that share an attribute, the path/dest is placed on the
bgp_syncrhonize->update fifo as well as being placed on the fifo
associated with the advertised attribute.

On actual creation of a packet.  The first item in the
bgp_synchronize->update fifo is popped.  The bgp_advertise_attr
pointer is grabbed, we fill out the nlri part of the bgp packet
and then walk the bgp_advertise_attr fifo to place paths/dests in
the packet.  As each path/dest is placed in the packet it is removed
from both the bgp_synchronize->update fifo and the bgp_advertise_attr
fifo.

The whole point of this change is to switch the *next, *prev
pointers in the bgp_advertise structure with a typesafe data
structure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
18 months agozebra: Free nexthop_group 14550/head
Keelan10 [Tue, 10 Oct 2023 09:13:09 +0000 (13:13 +0400)]
zebra: Free nexthop_group

`ng` was not properly freed, leading to a memory leak.
The commit calls `nexthop_group_delete` to free memory associated with `ng`.

The ASan leak log for reference:

```
***********************************************************************************
Address Sanitizer Error detected in isis_topo1.test_isis_topo1/r5.asan.zebra.24308

=================================================================
==24308==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f47b43d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x7f4f4753c0a8 in qcalloc lib/memory.c:105
    #2 0x7f4f47559526 in nexthop_group_new lib/nexthop_group.c:270
    #3 0x562ded6a39d4 in zebra_add_import_table_entry zebra/redistribute.c:681
    #4 0x562ded787c35 in rib_link zebra/zebra_rib.c:3972
    #5 0x562ded787c35 in rib_addnode zebra/zebra_rib.c:3993
    #6 0x562ded787c35 in process_subq_early_route_add zebra/zebra_rib.c:2860
    #7 0x562ded787c35 in process_subq_early_route zebra/zebra_rib.c:3138
    #8 0x562ded787c35 in process_subq zebra/zebra_rib.c:3178
    #9 0x562ded787c35 in meta_queue_process zebra/zebra_rib.c:3228
    #10 0x7f4f475f7118 in work_queue_run lib/workqueue.c:266
    #11 0x7f4f475dc7f2 in event_call lib/event.c:1969
    #12 0x7f4f4751f347 in frr_run lib/libfrr.c:1213
    #13 0x562ded69e818 in main zebra/main.c:486
    #14 0x7f4f468ffc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Indirect leak of 152 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f47b43d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x7f4f4753c0a8 in qcalloc lib/memory.c:105
    #2 0x7f4f475510ad in nexthop_new lib/nexthop.c:376
    #3 0x7f4f475539c5 in nexthop_dup lib/nexthop.c:914
    #4 0x7f4f4755b27a in copy_nexthops lib/nexthop_group.c:444
    #5 0x562ded6a3a1c in zebra_add_import_table_entry zebra/redistribute.c:682
    #6 0x562ded787c35 in rib_link zebra/zebra_rib.c:3972
    #7 0x562ded787c35 in rib_addnode zebra/zebra_rib.c:3993
    #8 0x562ded787c35 in process_subq_early_route_add zebra/zebra_rib.c:2860
    #9 0x562ded787c35 in process_subq_early_route zebra/zebra_rib.c:3138
    #10 0x562ded787c35 in process_subq zebra/zebra_rib.c:3178
    #11 0x562ded787c35 in meta_queue_process zebra/zebra_rib.c:3228
    #12 0x7f4f475f7118 in work_queue_run lib/workqueue.c:266
    #13 0x7f4f475dc7f2 in event_call lib/event.c:1969
    #14 0x7f4f4751f347 in frr_run lib/libfrr.c:1213
    #15 0x562ded69e818 in main zebra/main.c:486
    #16 0x7f4f468ffc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

SUMMARY: AddressSanitizer: 184 byte(s) leaked in 2 allocation(s).
***********************************************************************************
```

Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
18 months agoMerge pull request #14451 from m-varasteh/ospf-coverity-issues
Donatas Abraitis [Tue, 10 Oct 2023 06:01:03 +0000 (09:01 +0300)]
Merge pull request #14451 from m-varasteh/ospf-coverity-issues

ospfd: a possible fix for TAINTED_SCALAR coverity issues

18 months agoMerge pull request #14533 from mjstapp/fix_rule_notify_vrf
Donald Sharp [Mon, 9 Oct 2023 18:07:12 +0000 (14:07 -0400)]
Merge pull request #14533 from mjstapp/fix_rule_notify_vrf

lib,*: add vrf id to pbr rule results zapi message

18 months agozebra: Prevent leaking ctx memory in err condition 14548/head
Rajasekar Raja [Mon, 9 Oct 2023 16:54:54 +0000 (16:54 +0000)]
zebra: Prevent leaking ctx memory in err condition

When netlink_link_change() errors out for a new link for
interface without MTU set, the allocated ctx is not freed..
Adding code for correctness

Ticket# 3628313

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
18 months agoMerge pull request #14543 from mjstapp/fix_pbr_rule_unique
Donald Sharp [Mon, 9 Oct 2023 14:36:00 +0000 (10:36 -0400)]
Merge pull request #14543 from mjstapp/fix_pbr_rule_unique

zebra: add zclient to iprules key

18 months agoMerge pull request #10733 from anlancs/zebra-remove-update
Rafael Zalamena [Sun, 8 Oct 2023 13:52:54 +0000 (10:52 -0300)]
Merge pull request #10733 from anlancs/zebra-remove-update

zebra: remove ZEBRA_INTERFACE_VRF_UPDATE

18 months agoMerge pull request #14541 from idryzhov/isis-fix-cb-destroy
Rafael Zalamena [Sun, 8 Oct 2023 13:49:03 +0000 (10:49 -0300)]
Merge pull request #14541 from idryzhov/isis-fix-cb-destroy

isisd: remove redundant northbound destroy callbacks

18 months agodoc: replace commands list with header file 10733/head
anlan_cs [Sat, 7 Oct 2023 02:03:49 +0000 (10:03 +0800)]
doc: replace commands list with header file

Signed-off-by: anlan_cs <anlan_cs@tom.com>
18 months ago*: remove ZEBRA_INTERFACE_VRF_UPDATE
anlan_cs [Fri, 4 Mar 2022 13:52:27 +0000 (21:52 +0800)]
*: remove ZEBRA_INTERFACE_VRF_UPDATE

Currently when one interface changes its VRF, zebra will send these messages to
all daemons in *order*:
    1) `ZEBRA_INTERFACE_DELETE` ( notify them delete from old VRF )
    2) `ZEBRA_INTERFACE_VRF_UPDATE` ( notify them move from old to new VRF )
    3) `ZEBRA_INTERFACE_ADD` ( notify them added into new VRF )

When daemons deal with `VRF_UPDATE`, they use
`zebra_interface_vrf_update_read()->if_lookup_by_name()`
to check the interface exist or not in old VRF. This check will always return
*NULL* because `DELETE` ( deleted from old VRF ) is already done, so can't
find this interface in old VRF.

Send `VRF_UPDATE` is redundant and unuseful. `DELETE` and `ADD` are enough,
they will deal with RB tree, so don't send this `VRF_UPDATE` message when
vrf changes.

Since all daemons have good mechanism to deal with changing vrf, and don't
use this `VRF_UPDATE` mechanism.  So, it is safe to completely remove
all the code with `VRF_UPDATE`.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
18 months agobgpd: Implement EBGP-OAD peering type 14537/head
Donatas Abraitis [Fri, 6 Oct 2023 11:51:18 +0000 (14:51 +0300)]
bgpd: Implement EBGP-OAD peering type

At each EBGP boundary, BGP path attributes are modified as per [RFC4271], which includes stripping any IBGP-only attributes.

Some networks span more than one autonomous system and require more flexibility in the propagation of path attributes. It is worth noting that these multi-AS networks have a common or single administrative entity. These networks are said to belong to One Administrative Domain (OAD). It is desirable to carry IBGP-only attributes across EBGP peerings when the peers belong to an OAD.

This document defines a new EBGP peering type known as EBGP-OAD, which is used between two EBGP peers that belong to an OAD. This document also defines rules for route announcement and processing for EBGP-OAD peers.

https://datatracker.ietf.org/doc/html/draft-uttaro-idr-bgp-oad

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agotests: Check if EBGP-OAD works
Donatas Abraitis [Fri, 6 Oct 2023 11:48:04 +0000 (14:48 +0300)]
tests: Check if EBGP-OAD works

https://datatracker.ietf.org/doc/html/draft-uttaro-idr-bgp-oad

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agodoc: Add `neighbor oad` command
Donatas Abraitis [Fri, 6 Oct 2023 11:47:32 +0000 (14:47 +0300)]
doc: Add `neighbor oad` command

https://datatracker.ietf.org/doc/html/draft-uttaro-idr-bgp-oad

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agozebra: add zclient to iprules key 14543/head
Mark Stapp [Fri, 6 Oct 2023 16:26:38 +0000 (12:26 -0400)]
zebra: add zclient to iprules key

Include a zclient value in the hash and tree key computations
for iprules in zebra: clients may collide without this.

Signed-off-by: Mark Stapp <mjs@labn.net>
18 months agoisisd: remove redundant northbound destroy callbacks 14541/head
Igor Ryzhov [Fri, 6 Oct 2023 14:33:35 +0000 (17:33 +0300)]
isisd: remove redundant northbound destroy callbacks

Fixes startup warnings:
```
ISIS: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-segs-left'
ISIS: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-pop'
ISIS: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-h-encaps'
ISIS: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-d'
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
18 months agolib,*: add vrf id to pbr rule results zapi message 14533/head
Mark Stapp [Thu, 5 Oct 2023 15:02:42 +0000 (11:02 -0400)]
lib,*: add vrf id to pbr rule results zapi message

The iprule/pbr rule object has a vrf id, and zebra uses
that internally, but the vrf id isn't returned to clients
who install rules and are waiting for results. Include the
vrf_id sent by the client in the zapi result notification
message; update the existing clients so they decode the id.

Signed-off-by: Mark Stapp <mjs@labn.net>
18 months agobgpd: Drop redundant assignment for aspath segment type and length 14535/head
Donatas Abraitis [Thu, 5 Oct 2023 19:46:54 +0000 (22:46 +0300)]
bgpd: Drop redundant assignment for aspath segment type and length

They are already initialized via assegment_new().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agoMerge pull request #14534 from mjstapp/fix_topo_nhgid
Donald Sharp [Thu, 5 Oct 2023 19:36:27 +0000 (15:36 -0400)]
Merge pull request #14534 from mjstapp/fix_topo_nhgid

tests: locate nhg id from json output in all_proto_startup

18 months agotests: locate nhg id from json output in all_proto_startup 14534/head
Mark Stapp [Thu, 5 Oct 2023 17:47:17 +0000 (13:47 -0400)]
tests: locate nhg id from json output in all_proto_startup

Don't hard-code a sharpd nhg id: those values aren't stable
if the daemons/protos/route-types change. Use json show output
to find the id in the 'resilient' nhg test case in
the all_protocol_startup suite.

Signed-off-by: Mark Stapp <mjs@labn.net>
18 months agoMerge pull request #14517 from adrianomarto/pim-msdp-sa-rp
Donald Sharp [Thu, 5 Oct 2023 14:27:06 +0000 (10:27 -0400)]
Merge pull request #14517 from adrianomarto/pim-msdp-sa-rp

pimd: Indicating the configured PIM Rendezvous Point (RP) in the MSDP SA message

18 months agoMerge pull request #14474 from donaldsharp/strsep_fixup
Rafael Zalamena [Thu, 5 Oct 2023 12:25:45 +0000 (09:25 -0300)]
Merge pull request #14474 from donaldsharp/strsep_fixup

staticd: Memory leak of string in staticd

18 months agostaticd: Memory leak of string in staticd 14474/head
Donald Sharp [Fri, 22 Sep 2023 17:13:38 +0000 (13:13 -0400)]
staticd: Memory leak of string in staticd

XSTRDUP and then calling strsep mangles the
pointer returned by XSTRDUP.  Keep a copy
of the orig and when we are done, free that instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
18 months agoMerge pull request #14527 from opensourcerouting/fix/guard_debug_messages_for_ttl
Donald Sharp [Wed, 4 Oct 2023 11:33:12 +0000 (07:33 -0400)]
Merge pull request #14527 from opensourcerouting/fix/guard_debug_messages_for_ttl

bgpd: Add guards for zlog_debug when setting GTSM for the peer

18 months agopimd: Indicating the rp in the msdp sa message 14517/head
Adriano Marto Reis [Sat, 30 Sep 2023 05:49:40 +0000 (15:49 +1000)]
pimd: Indicating the rp in the msdp sa message

Indicating the configured PIM Rendezvous Point (RP) in the MSDP SA
message

The RFC-3618, section 12.2.1, describes the fields included in the MSDP
SA message. The "RP address" field is "the address of the RP in the
domain the source has become active in".

In the most common case, we will establish an MSDP connection from RP to
RP. However, there are cases where we want to establish a MSDP
connection from an interface/address that is not the RP. Section 3 of
RFC-3618 describes that scenario as "intermediate MSDP peer". Moreover,
the RP could be another router in the PIM domain - not the one
establishing the MSDP connection.

The current implementation could be problematic even with a single
router per PIM domain. Consider the following scenario:
* There are two PIM domains, each one with a single router.
* The two routers are connected via two independent networks. Let's say
that is to provide redundancy.
* The routers are configured to establish two MSDP connections, one on
each network (redundancy again).
* A multicast source becomes active on the router 1. It will be
communicated to router 2 via two independent MSDP SA messages, one per
MSDP connection.
* Without these changes, each MSDP SA message will indicate a different
RP.
* Both RP addresses will pass the RPF check, and both MSDP sources will
be accepted.
* If the router has clients interested in that multicast group, it will
send PIM Join messages to both RPs and start receiving the multicast
traffic from both.

With the changes included in this commit, the multicast source available
in router 1 would still be communicated to router 2 twice. But both MSDP
SA messages would indicate the same RP, and one of them would be
discarded due to failure in the RPF-check failure. Also, the changes
allow us to define the RP that will be included in the MSDP SA message,
and it could be one of the interfaces used to establish the MSDP
connection, some other interface on the router, a loopback interface, or
another router in the PIM domain.

These changes should not create compatibility issues. As I mentioned, we
usually establish MSDP connections from RP to RP. In this case, the
result will be the same. We would still indicate the address used to
establish the MSDP connection if the RP is not set - I wonder if that
should even be a valid configuration.

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
18 months agobgpd: Add guards for zlog_debug when setting GTSM for the peer 14527/head
Donatas Abraitis [Tue, 3 Oct 2023 14:46:24 +0000 (17:46 +0300)]
bgpd: Add guards for zlog_debug when setting GTSM for the peer

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agobgpd: Handle Addpath capability using dynamic capabilities 14528/head
Donatas Abraitis [Tue, 26 Sep 2023 13:44:49 +0000 (16:44 +0300)]
bgpd: Handle Addpath capability using dynamic capabilities

Changing Addpath type, and or disabling RX (receiving) flag, we can do this
without tearing down the session, and using dynamic capabilities.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agotests: Check if addpath capability is exchanged dynamically
Donatas Abraitis [Tue, 26 Sep 2023 13:38:18 +0000 (16:38 +0300)]
tests: Check if addpath capability is exchanged dynamically

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agobgpd: Clear addpath RX flag if it's absent
Donatas Abraitis [Tue, 26 Sep 2023 13:35:15 +0000 (16:35 +0300)]
bgpd: Clear addpath RX flag if it's absent

When we have RX/TX flags, but received only TX, we should clear RX flag, to avoid
receiving additional paths.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 months agoMerge pull request #14511 from opensourcerouting/fix/bgpd_software_version_capability
Russ White [Tue, 3 Oct 2023 14:36:21 +0000 (10:36 -0400)]
Merge pull request #14511 from opensourcerouting/fix/bgpd_software_version_capability

bgpd: Validate maximum length of software version when handling via dynamic caps

18 months agoMerge pull request #14472 from opensourcerouting/plist-dup
Russ White [Tue, 3 Oct 2023 14:28:52 +0000 (10:28 -0400)]
Merge pull request #14472 from opensourcerouting/plist-dup

lib: fix route map duplicated prefix removal evaluation

18 months agoMerge pull request #13814 from pguibert6WIND/comm_list_expanded_match_no_exact
Russ White [Tue, 3 Oct 2023 12:55:30 +0000 (08:55 -0400)]
Merge pull request #13814 from pguibert6WIND/comm_list_expanded_match_no_exact

bgpd: add match community "any" to match any incoming community

18 months agoMerge pull request #14508 from LabNConsulting/chopps/darr-use-frrmemfunc
Donatas Abraitis [Tue, 3 Oct 2023 07:34:27 +0000 (10:34 +0300)]
Merge pull request #14508 from LabNConsulting/chopps/darr-use-frrmemfunc

lib: use XREALLOC over realloc avoid coverity warning

18 months agoospfd: a possible fix for TAINTED_SCALAR coverity issues 14451/head
Mahdi Varasteh [Wed, 20 Sep 2023 05:24:25 +0000 (08:54 +0330)]
ospfd: a possible fix for TAINTED_SCALAR coverity issues

Signed-off-by: Mahdi Varasteh <varasteh@amnesh.ir>
18 months agoMerge pull request #14519 from anlancs/fix/doc-zebra-values
Donald Sharp [Mon, 2 Oct 2023 20:55:22 +0000 (16:55 -0400)]
Merge pull request #14519 from anlancs/fix/doc-zebra-values

18 months agotopotests: add bgp_large_comm_list_match test 13814/head
Philippe Guibert [Mon, 10 Jul 2023 14:41:38 +0000 (16:41 +0200)]
topotests: add bgp_large_comm_list_match test

Add a topotest to check for proper functioning of the
bgp large community list match operation under a route-map.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
18 months agobgpd: add 'match community-list any' function
Philippe Guibert [Tue, 27 Jun 2023 19:36:01 +0000 (21:36 +0200)]
bgpd: add 'match community-list any' function

There is no match mechanism to match one community from the
incoming community-list. Add the 'any' keyword to the 'match
route-map' command of communit-list and large-community-list.

> match community-list AAA any
> match large-community-list AAA any

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
18 months agodoc: adjust protocol command values for zebra 14519/head
anlan_cs [Sun, 1 Oct 2023 06:46:28 +0000 (14:46 +0800)]
doc: adjust protocol command values for zebra

Adjust protocol command values for zebra based on latest code.
Also, expand the field width to fit the length.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
19 months agozebra: be more careful removing 'installed' flag from nhgs 14515/head
Mark Stapp [Fri, 29 Sep 2023 16:08:17 +0000 (12:08 -0400)]
zebra: be more careful removing 'installed' flag from nhgs

When interface addresses change, we examine nhgs associated
with the interface in case they need to be reinstalled. As
part of that, we may need to reinstall ecmp nhgs that use the
interface being examined - but not always.

Signed-off-by: Mark Stapp <mjs@labn.net>
19 months agoMerge pull request #14510 from opensourcerouting/fix/coccinelle_issues
Donald Sharp [Fri, 29 Sep 2023 13:27:44 +0000 (09:27 -0400)]
Merge pull request #14510 from opensourcerouting/fix/coccinelle_issues

A couple minor fixes

19 months agoMerge pull request #12409 from FRIDM636/master
Donatas Abraitis [Fri, 29 Sep 2023 09:54:43 +0000 (12:54 +0300)]
Merge pull request #12409 from FRIDM636/master

zebra: delete label chunk upon release

19 months agotests: Make sure we have a valid FRRouting software version string 14511/head
Donatas Abraitis [Fri, 29 Sep 2023 09:15:24 +0000 (12:15 +0300)]
tests: Make sure we have a valid FRRouting software version string

It can't begin with anything else, otherwise something is broken on the wire.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agobgpd: Validate maximum length of software version when handling via dynamic caps
Donatas Abraitis [Fri, 29 Sep 2023 09:13:43 +0000 (12:13 +0300)]
bgpd: Validate maximum length of software version when handling via dynamic caps

We should not allow exceeding the stream's length, and also software version
can't be larger than 64 bytes.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months ago*: Do not cast to the same type as the destination is 14510/head
Donatas Abraitis [Fri, 29 Sep 2023 06:17:56 +0000 (09:17 +0300)]
*: Do not cast to the same type as the destination is

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agozebra: delete label chunk upon release 12409/head
fmihoub6WIND [Fri, 25 Nov 2022 10:17:07 +0000 (11:17 +0100)]
zebra: delete label chunk upon release

In zebra/label_manager.c the releasing of the label chunk is done by
disowning the chunk to the system. The presence of this system label
chunk will cause label assignment to fail for this use case example:

label chunk ospf: 300-320
label chunk system: 510-520
label chunk isis: 1200-1300

Then we try to allocate the chunk 500-530, we get this error:
  "Allocation of mpls label chunk [500/530] failed"

The error is raised when the below condition is true:
    /* if chunk is used, cannot honor request */
      if (lmc->proto != NO_PROTO)
      return NULL;

Delete the label chunk instead of disowning it when the label releasing
is done.

Signed-off-by: Farid MIHOUB <farid.mihoub@6wind.com>
19 months agozebra: dump label table information
fmihoub6WIND [Fri, 2 Dec 2022 10:10:19 +0000 (11:10 +0100)]
zebra: dump label table information

Add the new command "show debugging labeltable" to show allocated label
chunks in the label table managed with label_manager.c

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
19 months agozebra: Drop new lines from zlog_debug for dpdk debug messages
Donatas Abraitis [Fri, 29 Sep 2023 06:02:58 +0000 (09:02 +0300)]
zebra: Drop new lines from zlog_debug for dpdk debug messages

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agoMerge pull request #14507 from qlyoung/fix-doc-more-doc-more
Donatas Abraitis [Fri, 29 Sep 2023 05:41:41 +0000 (08:41 +0300)]
Merge pull request #14507 from qlyoung/fix-doc-more-doc-more

More developer doc fixes

19 months agoMerge pull request #14506 from louis-6wind/fix-bgp-link-state
Donatas Abraitis [Fri, 29 Sep 2023 05:29:31 +0000 (08:29 +0300)]
Merge pull request #14506 from louis-6wind/fix-bgp-link-state

bgpd: fix link state coverity scan issues

19 months agolib: use XREALLOC over realloc avoid coverity warning 14508/head
Christian Hopps [Thu, 28 Sep 2023 16:10:31 +0000 (12:10 -0400)]
lib: use XREALLOC over realloc avoid coverity warning

I believe coverity is complaining that the current code does not handle the
realloc fail case, in which case the original pointer is not freed, but NULL is
returned. The code assert()s it's not failed but that is not strong enough it
needs to abort which XREALLOC does and is a better integration into FRR-inrfa
anyway.

Signed-off-by: Christian Hopps <chopps@labn.net>
19 months agoMerge pull request #14505 from qlyoung/fix-rtd-build-sphinx-version
mobash-rasool [Fri, 29 Sep 2023 04:14:39 +0000 (09:44 +0530)]
Merge pull request #14505 from qlyoung/fix-rtd-build-sphinx-version

doc: unpin sphinx from 4.0.2

19 months agoMerge pull request #14503 from opensourcerouting/fix/add_bgp_neighbor_capability_dynamic
Donald Sharp [Thu, 28 Sep 2023 19:50:55 +0000 (15:50 -0400)]
Merge pull request #14503 from opensourcerouting/fix/add_bgp_neighbor_capability_dynamic

doc: Add `neighbor capability dynamic` command

19 months agoMerge pull request #14483 from opensourcerouting/fix/ignore_setting_ttl_for_negative_...
Donald Sharp [Thu, 28 Sep 2023 19:37:33 +0000 (15:37 -0400)]
Merge pull request #14483 from opensourcerouting/fix/ignore_setting_ttl_for_negative_socket

bgpd: Set the TTL for the correct socket