Commit Graph

33559 Commits

Author SHA1 Message Date
Donatas Abraitis
4e365c5c86 bgpd: Remove redundant check for bgp against NULL
bgp_orig is never NULL in the code path, and coverity is angry on this.

Let's remove this test at all.

Coverity 1566808

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-10-12 16:36:45 +03:00
Donald Sharp
9bc4d9eaec
Merge pull request #14559 from opensourcerouting/feature/update_dev_versions_for_packages
packaging: Increase development version for debian/redhat stuff
2023-10-11 11:34:57 -04:00
Donald Sharp
e9227719ea
Merge pull request #14564 from opensourcerouting/fix/mgmtd_vty_port
mgmtd: Change MGMTD_VTY_PORT to 2623
2023-10-11 11:33:50 -04:00
Russ White
97d8e5cecd
Merge pull request #14537 from opensourcerouting/feature/bgpd_aod
bgpd: Implement EBGP-OAD peering type
2023-10-11 10:22:26 -04:00
Russ White
7bc23dde1b
Merge pull request #14557 from volodymyrhuti/EIGRP_IF_DELETE_CRASH
eigrp: use correct memory pool on interface deletion
2023-10-11 10:17:54 -04:00
Russ White
9ff1a8c550
Merge pull request #14528 from opensourcerouting/feature/bgpd_handle_addpath_capability_via_dynamic_capability
bgpd: Handle Addpath capability using dynamic capabilities
2023-10-11 10:16:18 -04:00
Mark Stapp
176d5b7f59
Merge pull request #14437 from opensourcerouting/issue/14004
vtysh freezed on ospf 'no network' command when there are multiple networks and interfaces
2023-10-11 07:23:41 -04:00
Donald Sharp
ac78d70bb8
Merge pull request #14563 from opensourcerouting/fix/cpuwarning_starvation
lib: Suppress HOB/STARVATION warnings when running in vtysh
2023-10-11 07:21:43 -04:00
Donatas Abraitis
aeede097b4
Merge pull request #14554 from donaldsharp/bgp_fifo
bgpd: Convert the bgp_advertise_attr->adv to a fifo
2023-10-11 13:31:04 +03:00
Donatas Abraitis
eeda9b8ae8 mgmtd: Change MGMTD_VTY_PORT to 2623
This is clashing with PIMv6 (2622).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-10-11 13:27:28 +03:00
Donatas Abraitis
3ff671b830 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>
2023-10-11 09:52:19 +03:00
Donatas Abraitis
bfd1ff70f9
Merge pull request #14560 from donaldsharp/linkstate_reversal
Linkstate reversal
2023-10-11 08:01:46 +03:00
Donatas Abraitis
bdbb28868a debian: Increase version for development version to be 9.2
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-10-11 07:57:06 +03:00
Donatas Abraitis
70878500af redhat: Update frr.spec file with older releases and increase current version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-10-11 07:56:15 +03:00
Donald Sharp
0dc12c9003 Revert "lib: register bgp link-state afi/safi"
This reverts commit 1642a68d60.
2023-10-10 16:45:57 -04:00
Donald Sharp
9c44816398 Revert "yang: add bgp link-state"
This reverts commit 3cf5ff2715.
2023-10-10 16:45:45 -04:00
Donald Sharp
ddd96b51b0 Revert "bgpd: add bgp link-state address-family configuration context"
This reverts commit ae2f3bb5b4.
2023-10-10 16:45:32 -04:00
Donald Sharp
a4fcdc4e48 Revert "bgpd: accept bgp link-state capability"
This reverts commit 67fe40676e.
2023-10-10 16:45:24 -04:00
Donald Sharp
bbe3163a1b Revert "lib: add link-state prefixes"
This reverts commit c8172af682.
2023-10-10 16:45:11 -04:00
Donald Sharp
59c3a49166 Revert "bgpd: store bgp link-state prefixes"
This reverts commit 39a8d354c1.
2023-10-10 16:45:00 -04:00
Donald Sharp
f75d9050fc Revert "bgpd: send bgp link-state prefixes"
This reverts commit 0c94fb9cc8.
2023-10-10 16:44:51 -04:00
Donald Sharp
8b3e765d19 Revert "bgpd, lib: extend the size of the prefix string buffer"
This reverts commit bdb3fa3b92.
2023-10-10 16:44:34 -04:00
Donald Sharp
85a63731dc Revert "bgpd: do not display vty output headers for link-state prefixes"
This reverts commit 3098772467.
2023-10-10 16:44:26 -04:00
Donald Sharp
8a6b65f7fd Revert "bgpd: display link-state prefixes detail"
This reverts commit 7e0d9ff8ba.
2023-10-10 16:44:11 -04:00
Donald Sharp
4ab7fa86b0 Revert "bgpd: do not announce link-state routes to zebra"
This reverts commit 39fb34275f.
2023-10-10 16:43:59 -04:00
Donald Sharp
7679d6056b Revert "bgpd: add bgp default link-state command"
This reverts commit 38a7e20fc9.
2023-10-10 16:43:48 -04:00
Donald Sharp
d3261fd83f Revert "bgpd: add show bgp link-state link-state commands"
This reverts commit f11f67033f.
2023-10-10 16:43:38 -04:00
Donald Sharp
68bae36376 Revert "bgpd: add linkstate debug"
This reverts commit de38eada9c.
2023-10-10 16:43:28 -04:00
Donald Sharp
c4edb3a453 Revert "tests: add bgp_linkstate_topo1"
This reverts commit a0e6cd4c8f.
2023-10-10 16:43:17 -04:00
Donald Sharp
c274093587 Revert "doc: move bgp references at the right place"
This reverts commit 709fe971fd.
2023-10-10 16:43:07 -04:00
Donald Sharp
da622a28e6 Revert "doc: add the bgp link-state user documentation"
This reverts commit 115f4f1ddd.
2023-10-10 16:42:58 -04:00
Donald Sharp
166e52d6a3 Revert "bgpd: store and send bgp link-state attributes"
This reverts commit 8b531b1107.
2023-10-10 16:42:47 -04:00
Donald Sharp
547a0d02aa Revert "tests: add link-state attribute display in bgp_linkstate_topo1"
This reverts commit 5727195cbf.
2023-10-10 16:33:07 -04:00
Donald Sharp
63d2016da8 Revert "doc: add information to display bgp-ls attributes"
This reverts commit 8074d6f438.
2023-10-10 16:32:55 -04:00
Donald Sharp
e7c0191e82 Revert "bgpd: do not check attr in bgp_packet_attribute"
This reverts commit eb9e286511.
2023-10-10 16:31:28 -04:00
Donald Sharp
73a4891ab3 Revert "bgpd: fix illegal memory access in bgp_ls_tlv_check_size()"
This reverts commit dae5791c44.
2023-10-10 16:31:01 -04:00
Rodrigo Nardi
e0dbeff5bc
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>
2023-10-10 15:39:59 -03:00
Donald Sharp
2263d11630 Revert "bgpd: fix link_state_hash_cmp()"
This reverts commit 25408c8dbf.
2023-10-10 13:31:19 -04:00
Donald Sharp
298d534013 Revert "bgpd: fix insecure data write with ip addresses"
This reverts commit 54222f9213.
2023-10-10 13:31:13 -04:00
Donald Sharp
c0d3acb0a0 Revert "bgpd: fix insecure data write with area addresses"
This reverts commit 57d0dc565f.
2023-10-10 13:31:06 -04:00
Donald Sharp
28dab73877 Revert "bgpd: fix printing link state ospf opaque data"
This reverts commit e1333d12e0.
2023-10-10 13:30:57 -04:00
Volodymyr Huti
8ddf6a713f 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>
2023-10-10 20:01:17 +03:00
Donatas Abraitis
d2324b7b4a build: FRR 9.2 development version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-10-10 19:43:56 +03:00
mobash-rasool
9b6f41bfbe
Merge pull request #13617 from anlancs/fix/pimd-remove-pimreg-vrf
pimd: Fix missing pimreg interface
2023-10-10 22:10:24 +05:30
Russ White
03d1b44c9b
Merge pull request #14535 from opensourcerouting/fix/bgp_aggregate_stuff
bgpd: Drop redundant assignment for aspath segment type and length
2023-10-10 11:36:34 -04:00
Chirag Shah
0ddda5cd96
Merge pull request #14515 from mjstapp/fix_nhg_intf_uninstall
zebra: be more careful removing 'installed' flag from nhgs
2023-10-10 08:30:55 -07:00
Russ White
cc63e16a52
Merge pull request #14548 from raja-rajasekar/frr_dev1
zebra: Prevent leaking ctx memory in err condition
2023-10-10 11:05:11 -04:00
Donald Sharp
078bef324c
Merge pull request #14550 from Keelan10/fix-nexthop_group-leak
zebra: Free nexthop_group
2023-10-10 10:11:48 -04:00
Donald Sharp
b2e0c12d72 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>
2023-10-10 10:09:10 -04:00
Keelan10
92598cb2b9 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>
2023-10-10 13:13:09 +04:00