2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 18:08:16 +00:00

[#3731] Addressed fuzz option

This commit is contained in:
Francis Dupont 2025-03-16 22:41:27 +01:00 committed by Andrei Pavel
parent faf59c47df
commit ec73ec4ed1
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
2 changed files with 19 additions and 10 deletions

View File

@ -1,5 +1,4 @@
kea_dhcpsrv_lib = shared_library( sources = [
'kea-dhcpsrv',
'allocation_state.cc', 'allocation_state.cc',
'allocator.cc', 'allocator.cc',
'alloc_engine.cc', 'alloc_engine.cc',
@ -43,8 +42,6 @@ kea_dhcpsrv_lib = shared_library(
'dhcpsrv_messages.cc', 'dhcpsrv_messages.cc',
'flq_allocation_state.cc', 'flq_allocation_state.cc',
'flq_allocator.cc', 'flq_allocator.cc',
'fuzz_log.cc',
'fuzz_messages.cc',
'host.cc', 'host.cc',
'hosts_log.cc', 'hosts_log.cc',
'hosts_messages.cc', 'hosts_messages.cc',
@ -63,7 +60,6 @@ kea_dhcpsrv_lib = shared_library(
'ncr_generator.cc', 'ncr_generator.cc',
'network.cc', 'network.cc',
'network_state.cc', 'network_state.cc',
'packet_fuzzer.cc',
'parsers/base_network_parser.cc', 'parsers/base_network_parser.cc',
'parsers/client_class_def_parser.cc', 'parsers/client_class_def_parser.cc',
'parsers/dhcp_parsers.cc', 'parsers/dhcp_parsers.cc',
@ -88,6 +84,13 @@ kea_dhcpsrv_lib = shared_library(
'subnet.cc', 'subnet.cc',
'timer_mgr.cc', 'timer_mgr.cc',
'tracking_lease_mgr.cc', 'tracking_lease_mgr.cc',
]
if FUZZ_OPT.enabled()
sources += ['fuzz_log.cc', 'fuzz_messages.cc', 'packet_fuzzer.cc']
endif
kea_dhcpsrv_lib = shared_library(
'kea-dhcpsrv',
sources,
cpp_args: [ cpp_args: [
f'-DDHCP_DATA_DIR="@DHCP_DATA_DIR@"', f'-DDHCP_DATA_DIR="@DHCP_DATA_DIR@"',
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC@"', f'-DKEA_LFC_EXECUTABLE="@KEA_LFC@"',
@ -154,8 +157,6 @@ kea_dhcpsrv_headers = [
'dhcpsrv_messages.h', 'dhcpsrv_messages.h',
'flq_allocation_state.h', 'flq_allocation_state.h',
'flq_allocator.h', 'flq_allocator.h',
'fuzz_log.h',
'fuzz_messages.h',
'host.h', 'host.h',
'host_container.h', 'host_container.h',
'host_data_source_factory.h', 'host_data_source_factory.h',
@ -179,7 +180,6 @@ kea_dhcpsrv_headers = [
'ncr_generator.h', 'ncr_generator.h',
'network.h', 'network.h',
'network_state.h', 'network_state.h',
'packet_fuzzer.h',
'parsers/base_network_parser.h', 'parsers/base_network_parser.h',
'parsers/client_class_def_parser.h', 'parsers/client_class_def_parser.h',
'parsers/dhcp_parsers.h', 'parsers/dhcp_parsers.h',
@ -211,6 +211,9 @@ kea_dhcpsrv_headers = [
'utils.h', 'utils.h',
'writable_host_data_source.h', 'writable_host_data_source.h',
] ]
if FUZZ_OPT.enabled()
kea_dhcpsrv_headers += ['fuzz_log.h', 'fuzz_messages.h', 'packet_fuzzer.h']
endif
install_headers(kea_dhcpsrv_headers, preserve_path: true, subdir: 'kea/dhcpsrv') install_headers(kea_dhcpsrv_headers, preserve_path: true, subdir: 'kea/dhcpsrv')
if KEA_MSG_COMPILER.found() if KEA_MSG_COMPILER.found()

View File

@ -47,8 +47,7 @@ co3 = shared_library(
name_suffix: 'so', name_suffix: 'so',
) )
kea_dhcpsrv_tests = executable( sources = [
'kea-dhcpsrv-tests',
'alloc_engine4_unittest.cc', 'alloc_engine4_unittest.cc',
'alloc_engine6_unittest.cc', 'alloc_engine6_unittest.cc',
'alloc_engine_expiration_unittest.cc', 'alloc_engine_expiration_unittest.cc',
@ -122,6 +121,13 @@ kea_dhcpsrv_tests = executable(
'test_get_callout_handle.cc', 'test_get_callout_handle.cc',
'timer_mgr_unittest.cc', 'timer_mgr_unittest.cc',
'tracking_lease_mgr_unittest.cc', 'tracking_lease_mgr_unittest.cc',
]
if FUZZ_OPT.enabled()
sources += ['packet_fuzzer_unittest.cc']
endif
kea_dhcpsrv_tests = executable(
'kea-dhcpsrv-tests',
sources,
cpp_args: [ cpp_args: [
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"', f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DDHCP_DATA_DIR="@current_build_dir@"', f'-DDHCP_DATA_DIR="@current_build_dir@"',