From: Josh Date: Wed, 13 Aug 2014 18:16:56 +0000 (-0400) Subject: updating cmake to reflect new Makefile additions X-Git-Tag: 3.0.0-233~1426^2~8^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7b44efe290c0b0d6b089aa67e6febac398fcf7b;p=thirdparty%2Fsnort3.git updating cmake to reflect new Makefile additions --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2421112af..ffe55775f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project (snort CXX C) set (SNORT_VERSION_MAJOR 2) set (SNORT_VERSION_MINOR 10) -set (SNORT_VERSION_BUILD 108) +set (SNORT_VERSION_BUILD 113) set (VERSION "${SNORT_VERSION_MAJOR}.${SNORT_VERSION_MINOR}.${SNORT_VERSION_BUILD}") # ensure cmake will look in the cmake directory for configuration files diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index d786c0a59..e83e2b653 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -14,8 +14,6 @@ #ENDIF(UNIX) - - # convert cmake options into compiler defines set_project_compiler_defines_if_true (ENABLE_PERFPROFILING "PERF_PROFILING") @@ -32,9 +30,11 @@ set_project_compiler_defines_if_true (ENABLE_LARGE_PCAP "_FILE_OFFSET_BITS=64") # convert cmake options into config.h defines + set_if_true (STATIC_INSPECTORS STATIC_INSPECTORS) set_if_true (STATIC_SEARCH_ENGINES STATIC_SEARCH_ENGINES) set_if_true (STATIC_LOGGERS STATIC_LOGGERS) +set_if_true (STATIC_IPS_ACTIONS STATIC_IPS_ACTIONS) set_if_true (STATIC_IPS_OPTIONS STATIC_IPS_OPTIONS) set_if_true (STATIC_CODECS STATIC_CODECS) set_if_true (BUILD_SIDE_CHANNEL SIDE_CHANNEL) diff --git a/cmake/create_options.cmake b/cmake/create_options.cmake index ef466229e..2632304ec 100644 --- a/cmake/create_options.cmake +++ b/cmake/create_options.cmake @@ -8,6 +8,7 @@ option (STATIC_CODECS "include decoders in binary?" ON) option (STATIC_INSPECTORS "include inspectors in binary" ON) option (STATIC_LOGGERS "include loggers in binary" ON) +option (STATIC_IPS_ACTIONS "include internal ips actions in binary" ON) option (STATIC_IPS_OPTIONS "include ips options in binary" ON) option (STATIC_SEARCH_ENGINES "include search engines in binary" ON) option (BUILD_CONTROL_SOCKET "Enable the control socket (Linux only)" OFF) diff --git a/src/actions/CMakeLists.txt b/src/actions/CMakeLists.txt index 1a32828e9..e24e1bd9e 100644 --- a/src/actions/CMakeLists.txt +++ b/src/actions/CMakeLists.txt @@ -20,6 +20,10 @@ if (STATIC_IPS_ACTIONS) ${PLUGIN_LIST} ) + target_link_libraries(ips_actions + packet_io + ) + else (STATIC_IPS_ACTIONS) add_library ( ips_actions STATIC diff --git a/src/codecs/codec_api.cc b/src/codecs/codec_api.cc index f0066f0f7..5813423c9 100644 --- a/src/codecs/codec_api.cc +++ b/src/codecs/codec_api.cc @@ -58,6 +58,7 @@ extern const BaseApi* cd_gtp; extern const BaseApi* cd_hopopts; extern const BaseApi* cd_ip4_embedded_in_icmp; extern const BaseApi* cd_ip6_embedded_in_icmp; +extern const BaseApi* cd_prot_embedded_in_icmp; extern const BaseApi* cd_igmp; extern const BaseApi* cd_mobility; extern const BaseApi* cd_mpls; @@ -114,6 +115,7 @@ const BaseApi* codecs[] = cd_hopopts, cd_ip4_embedded_in_icmp, cd_ip6_embedded_in_icmp, + cd_prot_embedded_in_icmp, cd_igmp, cd_mobility, cd_mpls, diff --git a/src/codecs/misc/cd_ip4_embedded_in_icmp.cc b/src/codecs/misc/cd_ip4_embedded_in_icmp.cc index 0c0e9485d..51544837a 100644 --- a/src/codecs/misc/cd_ip4_embedded_in_icmp.cc +++ b/src/codecs/misc/cd_ip4_embedded_in_icmp.cc @@ -101,7 +101,7 @@ bool Ip4EmbeddedInIcmpCodec::decode(const uint8_t *raw_pkt, const uint32_t& raw_ } ip_len = ntohs(ip4h->get_len());/* set the IP datagram length */ - hlen = ip4h->get_len() << 2; /* set the IP header length */ + hlen = ip4h->get_hlen() << 2; /* set the IP header length */ if(raw_len < hlen) { @@ -212,7 +212,7 @@ static const CodecApi ip4_embedded_in_icmp_api = #ifdef BUILDING_SO SO_PUBLIC const BaseApi* snort_plugins[] = { - &name_api.base, + &ip4_embedded_in_icmp_api.base, nullptr }; #else diff --git a/src/codecs/misc/cd_ip6_embedded_in_icmp.cc b/src/codecs/misc/cd_ip6_embedded_in_icmp.cc index 59a3d74cc..8dd8e648a 100644 --- a/src/codecs/misc/cd_ip6_embedded_in_icmp.cc +++ b/src/codecs/misc/cd_ip6_embedded_in_icmp.cc @@ -183,7 +183,7 @@ static const CodecApi ip6_embedded_in_icmp_api = #ifdef BUILDING_SO SO_PUBLIC const BaseApi* snort_plugins[] = { - &name_api.base, + &ip6_embedded_in_icmp_api.base, nullptr }; #else