-kea_dhcpsrv_lib = shared_library(
- 'kea-dhcpsrv',
+sources = [
'allocation_state.cc',
'allocator.cc',
'alloc_engine.cc',
'dhcpsrv_messages.cc',
'flq_allocation_state.cc',
'flq_allocator.cc',
- 'fuzz_log.cc',
- 'fuzz_messages.cc',
'host.cc',
'hosts_log.cc',
'hosts_messages.cc',
'ncr_generator.cc',
'network.cc',
'network_state.cc',
- 'packet_fuzzer.cc',
'parsers/base_network_parser.cc',
'parsers/client_class_def_parser.cc',
'parsers/dhcp_parsers.cc',
'subnet.cc',
'timer_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: [
f'-DDHCP_DATA_DIR="@DHCP_DATA_DIR@"',
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC@"',
'dhcpsrv_messages.h',
'flq_allocation_state.h',
'flq_allocator.h',
- 'fuzz_log.h',
- 'fuzz_messages.h',
'host.h',
'host_container.h',
'host_data_source_factory.h',
'ncr_generator.h',
'network.h',
'network_state.h',
- 'packet_fuzzer.h',
'parsers/base_network_parser.h',
'parsers/client_class_def_parser.h',
'parsers/dhcp_parsers.h',
'utils.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')
if KEA_MSG_COMPILER.found()
name_suffix: 'so',
)
-kea_dhcpsrv_tests = executable(
- 'kea-dhcpsrv-tests',
+sources = [
'alloc_engine4_unittest.cc',
'alloc_engine6_unittest.cc',
'alloc_engine_expiration_unittest.cc',
'test_get_callout_handle.cc',
'timer_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: [
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DDHCP_DATA_DIR="@current_build_dir@"',