pavel-odintsov / fastnetmon

FastNetMon - very fast DDoS sensor with sFlow/Netflow/IPFIX/SPAN support
https://fastnetmon.com
GNU General Public License v2.0
3.42k stars 568 forks source link

AF_PACKET compilation issue #406

Closed pavel-odintsov closed 9 years ago

pavel-odintsov commented 9 years ago

ядро 3.0.101

/tmp/fastnetmon.build.dir.UiW4vYUWKx/fastnetmon/src/afpacket_plugin/afpacket_collector.cpp:67: error: field ‘h1’ has incomplete type
и там дальше много
и вот концовка
make[2]: *** [CMakeFiles/afpacket_plugin.dir/afpacket_plugin/afpacket_collector.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/afpacket_plugin.dir/all] Ошибка 2
make[1]: *** Ожидание завершения заданий...
Linking CXX static library libpfring_plugin.a
[ 68%] Built target pfring_plugin
Linking CXX static library libsflow_plugin.a
[ 68%] Built target sflow_plugin
Linking CXX static library libipfix_rfc.a
[ 68%] Built target ipfix_rfc
make: *** [all] Ошибка 2
Can't build fastnetmon! at fastnetmon_install.pl line 1129.
Built target ipfix_rfc
pavel-odintsov commented 9 years ago

We should not compile AF_PACKET on old platforms because they haven't required header files.

execute_process(
  COMMAND uname -r
  OUTPUT_VARIABLE KERNEL_RELEASE
  OUTPUT_STRIP_TRAILING_WHITESPACE
)
pavel-odintsov commented 9 years ago

Fixed in https://github.com/FastVPSEestiOu/fastnetmon/commit/f4a922e4ccf996ba1c86d2703cd4f909cba1a418 we compile AF_PACKET support only on recent kernels.