summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-02-04build: FRR 10.4 development versionfrr-10.4-devJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-02-04Merge pull request #17969 from donaldsharp/fpm_lost_sendsbase_10.3Mark Stapp
zebra: Ensure dplane does not send work back to master at wrong time
2025-02-04Merge pull request #17992 from chiragshah6/fdev5Russ White
bgpd: fix route-distinguisher in vrf leak json cmd
2025-02-04Merge pull request #17991 from chiragshah6/bgp_dev4Donatas Abraitis
zebra: fix evpn svd hash avoid double free
2025-02-04Merge pull request #17943 from opensourcerouting/clear-event-cpu-uafRuss White
lib: fix use after free in `clear event cpu`
2025-02-04Merge pull request #17336 from forrestchu/sbfdRuss White
implement SBFD
2025-02-04Merge pull request #17990 from enkechen-panw/aigp-cfg-defaultDonatas Abraitis
bgpd: add config default for "bgp bestpath aigp"
2025-02-04Merge pull request #17989 from cscarpitta/fix/fix_staticd_no_sidDonatas Abraitis
staticd: Fix wrong xpath in `no sid X:X::X:X/M`
2025-02-03bgpd: fix route-distinguisher in vrf leak json cmdChirag Shah
For auto configured value RD value comes as NULL, switching back to original change will ensure to cover for both auto and user configured RD value in JSON. tor-11# show bgp vrf blue ipv4 unicast route-leak json { "vrf":"blue", "afiSafi":"ipv4Unicast", "importFromVrfs":[ "purple" ], "importRts":"10.10.3.11:6", "exportToVrfs":[ "purple" ], "routeDistinguisher":"(null)", <<<<< "exportRts":"10.10.3.11:10" } Signed-off-by: Chirag Shah <chirag@nvidia.com>
2025-02-03zebra: evpn svd hash avoid double freeChirag Shah
Upon zebra shutdown hash_clean_and_free is called where user free function is passed, The free function should not call hash_release which lead to double free of hash bucket. Fix: The fix is to avoid calling hash_release from free function if its called from hash_clean_and_free path. 10 0x00007f0422b7df1f in free () from /lib/x86_64-linux-gnu/libc.so.6 11 0x00007f0422edd779 in qfree (mt=0x7f0423047ca0 <MTYPE_HASH_BUCKET>, ptr=0x55fc8bc81980) at ../lib/memory.c:130 12 0x00007f0422eb97e2 in hash_clean (hash=0x55fc8b979a60, free_func=0x55fc8a529478 <svd_nh_del_terminate>) at ../lib/hash.c:290 13 0x00007f0422eb98a1 in hash_clean_and_free (hash=0x55fc8a675920 <svd_nh_table>, free_func=0x55fc8a529478 <svd_nh_del_terminate>) at ../lib/hash.c:305 14 0x000055fc8a5323a5 in zebra_vxlan_terminate () at ../zebra/zebra_vxlan.c:6099 15 0x000055fc8a4c9227 in zebra_router_terminate () at ../zebra/zebra_router.c:276 16 0x000055fc8a4413b3 in zebra_finalize (dummy=0x7fffb881c1d0) at ../zebra/main.c:269 17 0x00007f0422f44387 in event_call (thread=0x7fffb881c1d0) at ../lib/event.c:2011 18 0x00007f0422ecb6fa in frr_run (master=0x55fc8b733cb0) at ../lib/libfrr.c:1243 19 0x000055fc8a441987 in main (argc=14, argv=0x7fffb881c4a8) at ../zebra/main.c:584 Signed-off-by: Chirag Shah <chirag@nvidia.com>
2025-02-03tests: Add test case to verify SID re-addCarmine Scarpitta
Add a new test case that re-add the deleted SIDs and verifies that all SIDs are added back to the RIB. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03tests: Add test case to verify SID deleteCarmine Scarpitta
Add a new test case that deletes a SID and verifies that only this SID has been removed from the RIB. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03staticd: Fix wrong xpath in `no sid X:X::X:X/M`Carmine Scarpitta
When a user wants to delete a specific SRv6 SID, he executes the `no sid X:X::X:X/M` command. However, by mistake, in addition to deleting the SID requested by the user, this command also removes all other SIDs. This happens because `no sid X:X::X:X/M` triggers a destroy operation on the wrong xpath `frr-staticd:staticd/segment-routing/srv6`. This commit fixes the issue by replacing the wrong xpath `frr-staticd:staticd/segment-routing/srv6` with the correct xpath `frr-staticd:staticd/segment-routing/srv6/static-sids/sid[sid='%s']`. This ensures that the `no sid X:X::X:X/M` command only deletes the SID that was requested by the user. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-03Merge pull request #17970 from mjstapp/fix_privs_no_capsDonald Sharp
libs: return from change_caps if no caps
2025-02-03Merge pull request #17913 from Sokolmish/bgp-sid-releaseCarmine Scarpitta
bgpd: Release SID on router deletion
2025-02-02bgpd: add config default for "bgp bestpath aigp"Enke Chen
Just to make it simpler for compiling with a different default value. No change to its default value. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2025-02-02Merge pull request #17979 from cscarpitta/fix/fix_staticd_sid_notifyDonatas Abraitis
staticd: Fix NULL pointer dereference when receiving `ZAPI_SRV6_SID_RELEASED` notification
2025-02-02Merge pull request #17947 from opensourcerouting/fix/bgp_disable_vrfRuss White
bgpd: Do not ignore auto generated VRF instances when deleting
2025-02-02Merge pull request #17964 from cscarpitta/fix/fix-srv6-sid-managerDonatas Abraitis
Fix SRv6 SID Manager
2025-02-02staticd: Fix NULL pointer dereferenceCarmine Scarpitta
When staticd receives a `ZAPI_SRV6_SID_RELEASED` notification from SRv6 SID Manager, it tries to unset the validity flag of `sid`. But since the `sid` variable is NULL, we get a NULL pointer dereference. ``` ================================================================= ==13815==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000060 (pc 0xc14b813d9eac bp 0xffffcb135a40 sp 0xffffcb135a40 T0) ==13815==The signal is caused by a READ memory access. ==13815==Hint: address points to the zero page. #0 0xc14b813d9eac in static_zebra_srv6_sid_notify staticd/static_zebra.c:1172 #1 0xe44e7aa2c194 in zclient_read lib/zclient.c:4746 #2 0xe44e7a9b69d8 in event_call lib/event.c:1984 #3 0xe44e7a85ac28 in frr_run lib/libfrr.c:1246 #4 0xc14b813ccf98 in main staticd/static_main.c:193 #5 0xe44e7a4773f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #6 0xe44e7a4774c8 in __libc_start_main_impl ../csu/libc-start.c:392 #7 0xc14b813cc92c in _start (/usr/lib/frr/staticd+0x1c92c) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV staticd/static_zebra.c:1172 in static_zebra_srv6_sid_notify ==13815==ABORTING ``` This commit fixes the problem by doing a SID lookup first. If the SID can't be found, we log an error and return. If the SID is found, we go ahead and unset the validity flag. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-02-02Merge pull request #17972 from enkechen-panw/rr-policyDonatas Abraitis
bgpd: add config default for "route-reflector allow-outbound-policy"
2025-02-01bgpd: add config default for "route-reflector allow-outbound-policy"Enke Chen
Just to make it simpler for compiling with a different default value. No change to its default value. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2025-02-01Merge pull request #17971 from donaldsharp/suppress_fib_giving_us_the_businessDonatas Abraitis
bgpd: With suppress-fib-pending ensure withdrawal is sent
2025-01-31bgpd: With suppress-fib-pending ensure withdrawal is sentDonald Sharp
When you have suppress-fib-pending turned on it is possible to end up in a situation where the prefix is not withdrawn from downstream peers. Here is the timing that I believe is happening: a) have 2 paths to a peer. b) receive a withdrawal from 1 path, set BGP_NODE_FIB_INSTALL_PENDING and send the route install to zebra. c) receive a withdrawal from the other path. d) At this point we have a dest->flags set BGP_NODE_FIB_INSTALL_PENDING old_select the path_info going away, new_select is NULL e) A bit further down we call group_announce_route() which calls the code to see if we should advertise the path. It sees the BGP_NODE_FIB_INSTALL_PENDING flag and says, nope. f) the route is sent to zebra to withdraw, which unsets the BGP_NODE_FIB_INSTALL_PENDING. g) This function winds up and deletes the path_info. Dest now has no path infos. h) BGP receives the route install(from step b) and unsets the BGP_NODE_FIB_INSTALL_PENDING flag i) BGP receives the route removed from zebra (from step f) and unsets the flag again. We know if there is no new_select, let's go ahead and just unset the PENDING flag to allow the withdrawal to go out at the time when the second withdrawal is received. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-31libs: return from change_caps if no capsMark Stapp
When called without caps/privs, just return from "change_caps" instead of exiting - it's possible that a process may not need privs, but a lib (for example) may use the api. Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-01-31zebra: Ensure dplane does not send work back to master at wrong timeDonald Sharp
When looping through the dplane providers, the worklist was being populated with items from the last provider and then the event system was checked to see if we should stop processing. If the event system says `yes` then the dplane code would stop and send the worklist to the master zebra pthread for collection. This obviously skipped the next dplane provider on the list which is double plus not good. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-31Merge pull request #17956 from pguibert6WIND/isis_srv6_codepoint_erroneousDonatas Abraitis
isisd: fix erroneous srv6 information in database
2025-01-30tests: Add testcase for static End/uN validationCarmine Scarpitta
This commit adds a testcase to validate static End/uN allocation. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-01-30zebra: Fix SRv6 SID ManagerCarmine Scarpitta
The SRv6 SID Manager does not allow allocating an SRv6 End/uN function even though it is already supported by staticd. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-01-30Merge pull request #17934 from nabahr/autorp-closeDonatas Abraitis
pimd: Close AutoRP socket when not needed
2025-01-30topotests: Router deletion in SRv6 sid reachabilityMikhail Sokolovskiy
Signed-off-by: Mikhail Sokolovskiy <sokolmish@gmail.com>
2025-01-30bgpd: Release SID on router deletionMikhail Sokolovskiy
Signed-off-by: Mikhail Sokolovskiy <sokolmish@gmail.com>
2025-01-29Merge pull request #17935 from mjstapp/fix_nhg_hash_equalDonald Sharp
zebra: include resolving nexthops in nhg hash
2025-01-29Merge pull request #17946 from bobuhiro11/normalize_ebgp_multihopDonatas Abraitis
tools: Fix frr-reload for ebgp-multihop TTL reconfiguration.
2025-01-29isisd: fix erroneous srv6 information in databasePhilippe Guibert
The show isis database detail command dumps invalid srv6 information: > SRv6 Locator: fc00:0:6::/64 (Metric: 0) ipv6-unicast > Sub-TLVs: > SRv6 End SID Endpoint Behavior: unknown, SID value: fc00:0:6:0:1:: > > MT Reachability: 0123.6452.1973.03 (Metric: 10) ipv6-unicast > Local Interface IPv6 Address(es): 192::4:3 > SRv6 Lan End.X SID: fc00:0:3:0:43::, Algorithm: SPF, Weight: 0, Endpoint Behavior: End.DX6, Flags: B:0, S:0, P:0 Neighbor-ID: 0123.6452.1975 > SRv6 SID Structure Locator Block length: 40, Locator Node length: 24, Function length: 16, Argument length: 0, The behavior codepoint should use the IANA definitions to display the correct value. Fix this by calling the appropriate convert function. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-29tools: Fix frr-reload for ebgp-multihop TTL reconfiguration.Nobuhiro MIKI
In ebgp-multihop, there is a difference in reload behavior when TTL is unspecified (meaning default 255) and when 255 is explicitly specified. For example, when reloading with 'neighbor <neighbor> ebgp-multihop 255' in the config, the following difference is created. This commit fixes that. Lines To Delete =============== router bgp 65001 no neighbor 10.0.0.4 ebgp-multihop exit Lines To Add ============ router bgp 65001 neighbor 10.0.0.4 ebgp-multihop 255 exit The commit 767aaa3a8048 is not sufficient and frr-reload needs to be fixed to handle both unspecified and specified cases. Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
2025-01-28tests: Add a test that shows the v6 recursive nexthop problemDonald Sharp
Currently FRR does not handle v6 recurisive resolution properly when the route being recursed through changes and the most significant bits of the route are not changed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-28Merge pull request #17941 from opensourcerouting/fix-dst-srcRuss White
static: fix botched staticd YANG conversion for dst-src
2025-01-28Merge pull request #17802 from askorichenko/test-fix-table-mapRuss White
bgpd: fix table-map option
2025-01-28Merge pull request #17906 from ↵Russ White
LabNConsulting/aceelindem/ospf-prune-dup-next-hops ospfd: Prune duplicate next-hop when installing into zebra route table.
2025-01-28Merge pull request #17848 from pguibert6WIND/isis_srv6_topo1_pingRuss White
Isis srv6 topo1 ping
2025-01-28Merge pull request #17924 from donaldsharp/evaluate_paths_optimizationRuss White
bgpd: Optimize evaluate paths for a peer going down
2025-01-28Merge pull request #17881 from opensourcerouting/fix/last_reset_reasonRuss White
bgpd: last reset SNAFU
2025-01-28lib: fix use after free in `clear event cpu`David Lamparter
Freeing any item here means freeing someone's `event->hist`, leaving a dangling pointer there. Which will immediately be written to because we're executing in a CLI function under the `vty_read` event, whose `event->hist` is then updated. Deallocating `event->hist` anywhere other than shutting down the whole event loop is a bad idea to begin with, just zero out the stats instead. Fixes: FRRouting/frr#16419 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28Merge pull request #17863 from opensourcerouting/fix/bgp_coverity_1617727Russ White
bgpd: Check if the peer really exists before sending dynamic capability
2025-01-28Merge pull request #17736 from opensourcerouting/table-directRuss White
bgpd,lib,zebra: permit table-direct on VRFs
2025-01-28bgpd: Do not ignore auto generated VRF instances when deletingDonatas Abraitis
When VRF instance is going to be deleted inside bgp_vrf_disable(), it uses a helper method that skips auto created VRF instances and that leads to STALE issue. When creating a VNI for a particular VRF vrfX with e.g. `advertise-all-vni`, auto VRF instance is created, and then we do `router bgp ASN vrf vrfX`. But when we do a reload bgp_vrf_disable() is called, and we miss previously created auto instance. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-28topotests: test v6 & dst-src in static_simpleDavid Lamparter
The "static_simple" test has code for testing IPv6 routes, but it wasn't even being run (duh.) Enable it, and also test IPv6 dst-src routes. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28staticd: fix NHT for dst-src routesDavid Lamparter
staticd's NHT code wasn't updating dst-src routes :( Fixes: FRRouting/frr#14247 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-01-28lib, zebra: carry source prefix in route_notifyDavid Lamparter
When a daemon wants to know about its routes, make it possible to have that work for dst-src routes. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>