summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-19Merge pull request #18692 from donaldsharp/event_cleanupsHEADmasterDonatas Abraitis
zebra: Save event pointer for rib sweeping
2025-04-18zebra: Save event pointer for rib sweepingDonald Sharp
The rib_sweep_route function when not doing graceful restart does not attempt to save the event on the t_rib_sweep pointer for shutdown. Prevent any weird shenanigans by allowing shutdown to clean up the rib_sweep_route event. Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2025-04-17Merge pull request #18675 from mjstapp/fix_clang_18_warningsDonald Sharp
lib,pimd,bgpd,bfdd: Fix clang 18 warnings
2025-04-17Merge pull request #18658 from y-bharath14/srib-tests-v12Donatas Abraitis
tests: Resource leak in common_config.py
2025-04-17Merge pull request #18538 from nabahr/autorp-enablingDonald Sharp
pimd: Only create and bind the autorp socket when really needed
2025-04-16bfdd, bgpd: clean up clang warningsMark Stapp
Clean up some clang compiler warnings. Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-16pimd: clean up clang warningsMark Stapp
Clean up clang warnings in pimd; mostly address-of-packed issues (removed some ugly casts too). Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-16lib: disable clang warning in parser yacc outputMark Stapp
Disable a clang 'unused' warning in the yacc source of command_parse.c. Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-16Merge pull request #18669 from opensourcerouting/rfapi-misused-conditionalJafar Al-Gharaibeh
bgpd: fix misused rfapi conditional
2025-04-16Merge pull request #18665 from y-bharath14/srib-yang-v10Donald Sharp
yang: Corrected pyang errors in frr-pathd.yang
2025-04-16Merge pull request #18497 from krishna-samy/show-metaq-countersMark Stapp
zebra: show command to display metaq info
2025-04-16Merge pull request #18579 from krishna-samy/krishna/dplane_fpm_readMark Stapp
zebra: change fpm_read to batch the messages
2025-04-16Merge pull request #18667 from louis-6wind/fix-srv6-sid-leakCarmine Scarpitta
isisd: fix srv6_sid memory leak
2025-04-16bgpd: fix misused rfapi conditionalDavid Lamparter
bgpd/bgpd.c:8975:5: error: "ENABLE_BGP_VNC" is not defined, evaluates to 0 [-Werror=undef] 8975 | #if ENABLE_BGP_VNC Fixes: FRRouting#18546 Fixes: 1629c05924fe9 ("bgpd: rfapi: track outstanding rib and import timers, free mem at exit") Cc: G. Paul Ziemba <paulz@labn.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-04-16isisd: fix srv6_sid memory leakLouis Scalbert
Seen with isis_srv6_topo1 topotest. > ==178793==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 56 byte(s) in 1 object(s) allocated from: > #0 0x7f3f63cb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7f3f6366f8dd in qcalloc lib/memory.c:105 > #2 0x561b810c62b7 in isis_srv6_sid_alloc isisd/isis_srv6.c:243 > #3 0x561b8111f944 in isis_zebra_srv6_sid_notify isisd/isis_zebra.c:1534 > #4 0x7f3f637df9d7 in zclient_read lib/zclient.c:4845 > #5 0x7f3f637779b2 in event_call lib/event.c:2011 > #6 0x7f3f63642ff1 in frr_run lib/libfrr.c:1216 > #7 0x561b81018bf2 in main isisd/isis_main.c:360 > #8 0x7f3f63029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Fixes: 0af0f4616d ("isisd: Receive SRv6 SIDs notifications from zebra") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-16Merge pull request #18662 from mjstapp/fix_test_nb_endianDavid Lamparter
2025-04-16yang: Corrected pyang errors in frr-pathd.yangY Bharath
Corrected pyang warnings and errors in frr-pathd.yang Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-16zebra: change fpm_read to batch the messagesKrishnasamy
Make code changes in fpm_read to create a list of ctx and send it to zebra for processing rather than sending individual ctx Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
2025-04-15tests: add nb test binary to .gitignoreMark Stapp
Add a northbound unit-test binary product to .gitignore Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-15tests: use little-endian order for libyang apiMark Stapp
Use the expected - little-endian - byte-order for a param to one of the libyang apis; tests fail on LE architectures otherwise. Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-15Merge pull request #18592 from zmw12306/bfd_set_shutdownRuss White
bfdd: Set bfd.LocalDiag when transitioning to AdminDown
2025-04-15Merge pull request #18540 from LabNConsulting/chopps/list-entry-doneRuss White
lib: nb: add list_entry_done() callback to free resources
2025-04-15Merge pull request #18610 from lsang6WIND/yang-isisdChristian Hopps
fix yang commands that don't have yang attr
2025-04-15Merge pull request #18653 from louis-6wind/fix-bgp-pbr-mem-leaksDonatas Abraitis
bgpd: fix pbr memory leaks
2025-04-15tests: Resource leak in common_config.pyY Bharath
Address pending changes from PR:18574 Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-14Merge pull request #18655 from mjstapp/fix_clang_lib_bgpJafar Al-Gharaibeh
lib,bgpd: clean up clang warnings
2025-04-14Merge pull request #18654 from chdxD1/v4-via-v6-nexthopDonald Sharp
Add v4-via-v6 nexthop support to staticd
2025-04-14Merge pull request #18641 from donaldsharp/fpm_listener_storageJafar Al-Gharaibeh
zebra: Add ability to dump routes received from fpm_listener
2025-04-14lib,bgpd: clean up clang warningsMark Stapp
Clean up a couple of clang compiler warnings (this was clang 18) Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-14Merge pull request #18578 from ak503/pim6_use_sourceJafar Al-Gharaibeh
pim6d: fix missing 'use-source' interface command
2025-04-14doc: Add v4-over-v6 next-hop to staticd docsChristopher Dziomba
GATEWAY can now be v4 or v6 for v4 routes, for v6 routes it can only be v6 (like today). Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2025-04-14tests: Validating staticd v4-over-v6 nexthopChristopher Dziomba
Introducing do_ipv6_nexthop to static_simple topotest. The test configures IPv4 routes with IPv6 nexthop and validates that via inet6 is visible in the Linux Kernel Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2025-04-14staticd: Add v4-via-v6 nexthop supportChristopher Dziomba
Routing v4 over an v6 nexthop is already well supported within zebra (and FRR). This adds support to staticd, allowing an IPv6 nexthop to be provided to ip route statements. For this the commands are extended and the address family is parsed from the parameter. When receiving nht updates from zebra, both AFIs are checked because prefixes could exist in both. Additionally when route_node is known, family of prefix is used instead of nexthop. Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2025-04-14bgpd: fix bgp_pbr_or_filter memory leaksLouis Scalbert
Note that bgp_pbr_policyroute_add_from_zebra() and bgp_pbr_policyroute_remove_from_zebra() are only called from bgp_pbr_handle_entry(). > ==966967==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 40 byte(s) in 1 object(s) allocated from: > #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fd44746f8dd in qcalloc lib/memory.c:105 > #2 0x7fd44744401a in list_new lib/linklist.c:49 > #3 0x560f8c094490 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2818 > #4 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941 > #5 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618 > #6 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691 > #7 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856 > #8 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955 > #9 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980 > #10 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282 > #11 0x7fd4475779b2 in event_call lib/event.c:2011 > #12 0x7fd447442ff1 in frr_run lib/libfrr.c:1216 > #13 0x560f8bef0a15 in main bgpd/bgp_main.c:545 > #14 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 > > Direct leak of 40 byte(s) in 1 object(s) allocated from: > #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fd44746f8dd in qcalloc lib/memory.c:105 > #2 0x7fd44744401a in list_new lib/linklist.c:49 > #3 0x560f8c09439d in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2812 > #4 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941 > #5 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618 > #6 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691 > #7 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856 > #8 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955 > #9 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980 > #10 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282 > #11 0x7fd4475779b2 in event_call lib/event.c:2011 > #12 0x7fd447442ff1 in frr_run lib/libfrr.c:1216 > #13 0x560f8bef0a15 in main bgpd/bgp_main.c:545 > #14 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 > > Direct leak of 4 byte(s) in 1 object(s) allocated from: > #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fd44746f8dd in qcalloc lib/memory.c:105 > #2 0x560f8c080cec in bgp_pbr_extract_enumerate_unary bgpd/bgp_pbr.c:362 > #3 0x560f8c080f7e in bgp_pbr_extract_enumerate bgpd/bgp_pbr.c:400 > #4 0x560f8c094530 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2819 > #5 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941 > #6 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618 > #7 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691 > #8 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856 > #9 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955 > #10 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980 > #11 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282 > #12 0x7fd4475779b2 in event_call lib/event.c:2011 > #13 0x7fd447442ff1 in frr_run lib/libfrr.c:1216 > #14 0x560f8bef0a15 in main bgpd/bgp_main.c:545 > #15 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 > > Direct leak of 4 byte(s) in 1 object(s) allocated from: > #0 0x7fd447ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fd44746f8dd in qcalloc lib/memory.c:105 > #2 0x560f8c080cec in bgp_pbr_extract_enumerate_unary bgpd/bgp_pbr.c:362 > #3 0x560f8c080f7e in bgp_pbr_extract_enumerate bgpd/bgp_pbr.c:400 > #4 0x560f8c09443d in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2813 > #5 0x560f8c095993 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2941 > #6 0x560f8c2164f3 in bgp_zebra_announce bgpd/bgp_zebra.c:1618 > #7 0x560f8c0bd668 in bgp_process_main_one bgpd/bgp_route.c:3691 > #8 0x560f8c0be7fe in process_subq_other_route bgpd/bgp_route.c:3856 > #9 0x560f8c0bf280 in process_subq bgpd/bgp_route.c:3955 > #10 0x560f8c0bf320 in meta_queue_process bgpd/bgp_route.c:3980 > #11 0x7fd44759fdfc in work_queue_run lib/workqueue.c:282 > #12 0x7fd4475779b2 in event_call lib/event.c:2011 > #13 0x7fd447442ff1 in frr_run lib/libfrr.c:1216 > #14 0x560f8bef0a15 in main bgpd/bgp_main.c:545 > #15 0x7fd446e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-14bgpd: fix bgp_pbr_rule memory leakLouis Scalbert
Fix bgp_pbr_rule memory leak. Found by code review. Fixes: 27e376d4e1 ("bgpd: an hash list of pbr iprule is created") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-14bgpd: fix bgp_pbr_match memory leakLouis Scalbert
> Direct leak of 1144 byte(s) in 13 object(s) allocated from: > #0 0x7f3eedeb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7f3eed86f8dd in qcalloc lib/memory.c:105 > #2 0x55b32d236faf in bgp_pbr_match_alloc_intern bgpd/bgp_pbr.c:1074 > #3 0x7f3eed817d79 in hash_get lib/hash.c:147 > #4 0x55b32d242d9a in bgp_pbr_policyroute_add_to_zebra_unit bgpd/bgp_pbr.c:2486 > #5 0x55b32d244436 in bgp_pbr_policyroute_add_to_zebra bgpd/bgp_pbr.c:2672 > #6 0x55b32d245a05 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2843 > #7 0x55b32d246912 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2939 > #8 0x55b32d3c7472 in bgp_zebra_announce bgpd/bgp_zebra.c:1618 > #9 0x55b32d26e5e7 in bgp_process_main_one bgpd/bgp_route.c:3691 > #10 0x55b32d26f77d in process_subq_other_route bgpd/bgp_route.c:3856 > #11 0x55b32d2701ff in process_subq bgpd/bgp_route.c:3955 > #12 0x55b32d27029f in meta_queue_process bgpd/bgp_route.c:3980 > #13 0x7f3eed99fdd8 in work_queue_run lib/workqueue.c:282 > #14 0x7f3eed97798e in event_call lib/event.c:2011 > #15 0x7f3eed842ff1 in frr_run lib/libfrr.c:1216 > #16 0x55b32d0a1a15 in main bgpd/bgp_main.c:545 > #17 0x7f3eed229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Fixes: d114b0d739 ("bgpd: inject policy route entry from bgp into zebra pbr entries.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-14bgpd: fix bgp_pbr_match_entry memory leakLouis Scalbert
> ==238132==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 160 byte(s) in 1 object(s) allocated from: > #0 0x7fd79f0b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fd79ea6f8dd in qcalloc lib/memory.c:105 > #2 0x5586b26995f9 in bgp_pbr_match_entry_alloc_intern bgpd/bgp_pbr.c:1155 > #3 0x7fd79ea17d79 in hash_get lib/hash.c:147 > #4 0x5586b26a551d in bgp_pbr_policyroute_add_to_zebra_unit bgpd/bgp_pbr.c:2522 > #5 0x5586b26a6436 in bgp_pbr_policyroute_add_to_zebra bgpd/bgp_pbr.c:2672 > #6 0x5586b26a8089 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2876 > #7 0x5586b26a8912 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2939 > #8 0x5586b2829472 in bgp_zebra_announce bgpd/bgp_zebra.c:1618 > #9 0x5586b282ab4b in bgp_zebra_announce_table bgpd/bgp_zebra.c:1766 > #10 0x5586b2824b99 in bgp_zebra_tm_connect bgpd/bgp_zebra.c:1091 > #11 0x7fd79eb7798e in event_call lib/event.c:2011 > #12 0x7fd79ea42ff1 in frr_run lib/libfrr.c:1216 > #13 0x5586b2503a15 in main bgpd/bgp_main.c:545 > #14 0x7fd79e429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Fixes: d114b0d739 ("bgpd: inject policy route entry from bgp into zebra pbr entries.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-12Merge pull request #18649 from donaldsharp/rpki_testing_and_buf_fixJafar Al-Gharaibeh
Rpki testing and bug fix
2025-04-12tests: Add more tests to bgp_rpki_topo1 testDonald Sharp
Looking at the gcov of the rpki code, I noticed that there was some functionality that is not covered in our test suites. Add the functionality. Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2025-04-12bgpd: Prevent crash when issuing a show rpki connectionsDonald Sharp
When attempting to check rpki status and the connection has been turned off, let's check to see if we are connected before we ask the rpki subsystem, else we will get a crash in the rpki library. Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2025-04-12pim6d: fix missing 'use-source' interface commandDmitrii Turlupov
Signed-off-by: Dmitrii Turlupov <turlupov@bk.ru>
2025-04-11Merge pull request #18645 from louis-6wind/fix-zebra-pbr-leakDonald Sharp
zebra: fix pbr_iptable memory leak
2025-04-11Merge pull request #18574 from y-bharath14/srib-tests-v10Donatas Abraitis
tests: Shadowing the built-in function
2025-04-11Merge pull request #18628 from raja-rajasekar/rajasekarr/fix_frr_reload_srv6Carmine Scarpitta
tools: fix reload script for SRv6 locators and formats
2025-04-11Merge pull request #18640 from donaldsharp/fpm_listener_nhg_dataJafar Al-Gharaibeh
zebra: modify fpm_listener to display data about nhgs
2025-04-11Merge pull request #18597 from pguibert6WIND/end_b6_encaps_extensionsCarmine Scarpitta
lib, staticd, isisd: add B6.ENCAPS codepoint extensions
2025-04-11zebra: clean pbr_iptable interface_name_list freeLouis Scalbert
Clean up code related to pbr_iptable->interface_name_list free. This is a cosmetic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-11zebra: fix pbr_iptable memory leakLouis Scalbert
We are obviously doing deleting on wrong object. > Direct leak of 40 byte(s) in 1 object(s) allocated from: > #0 0x7fcf718b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fcf7126f8dd in qcalloc lib/memory.c:105 > #2 0x7fcf7124401a in list_new lib/linklist.c:49 > #3 0x55771621d86d in pbr_iptable_alloc_intern zebra/zebra_pbr.c:1015 > #4 0x7fcf71217d79 in hash_get lib/hash.c:147 > #5 0x55771621dad3 in zebra_pbr_add_iptable zebra/zebra_pbr.c:1030 > #6 0x55771614d00c in zread_iptable zebra/zapi_msg.c:4131 > #7 0x55771614e586 in zserv_handle_commands zebra/zapi_msg.c:4424 > #8 0x5577162dae2c in zserv_process_messages zebra/zserv.c:521 > #9 0x7fcf7137798e in event_call lib/event.c:2011 > #10 0x7fcf71242ff1 in frr_run lib/libfrr.c:1216 > #11 0x5577160e4d6d in main zebra/main.c:540 > #12 0x7fcf70c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 > > Indirect leak of 24 byte(s) in 1 object(s) allocated from: > #0 0x7fcf718b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 > #1 0x7fcf7126f8dd in qcalloc lib/memory.c:105 > #2 0x7fcf71244129 in listnode_new lib/linklist.c:71 > #3 0x7fcf71244238 in listnode_add lib/linklist.c:92 > #4 0x55771621d938 in pbr_iptable_alloc_intern zebra/zebra_pbr.c:1019 > #5 0x7fcf71217d79 in hash_get lib/hash.c:147 > #6 0x55771621dad3 in zebra_pbr_add_iptable zebra/zebra_pbr.c:1030 > #7 0x55771614d00c in zread_iptable zebra/zapi_msg.c:4131 > #8 0x55771614e586 in zserv_handle_commands zebra/zapi_msg.c:4424 > #9 0x5577162dae2c in zserv_process_messages zebra/zserv.c:521 > #10 0x7fcf7137798e in event_call lib/event.c:2011 > #11 0x7fcf71242ff1 in frr_run lib/libfrr.c:1216 > #12 0x5577160e4d6d in main zebra/main.c:540 > #13 0x7fcf70c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Fixes: f80ec7e3d6 ("zebra: handle iptable list of interfaces") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-11zebra: split up MTYPE_PBR_OBJLouis Scalbert
Split up MTYPE_PBR_OBJ into dedicated MTYPE to clarify the memory allocation and free. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-04-11Merge pull request #18642 from louis-6wind/fix-asla-leakDonald Sharp
isisd: fix asla memory leak