Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate IPFire Location (new implementation for the geoip keyword) #6398

Closed
wants to merge 10 commits into from
14 changes: 14 additions & 0 deletions configure.ac
Expand Up @@ -1945,6 +1945,19 @@
LIBS="$TMPLIBS"
fi

# IPFire Location (libloc)
AC_ARG_ENABLE(libloc,
AS_HELP_STRING([--enable-libloc],[Build in support for IPFire Location]),
[enable_libloc="$enableval"],
[enable_libloc="no"])
if test "$enable_libloc" = "xyes"; then
PKG_CHECK_MODULES([LIBLOC], [libloc >= 0.9.9],
[enable_libloc="yes"; AC_DEFINE([HAVE_LIBLOC], [1], [Use libloc])],
[test "x$enable_libloc" = "xyes" && AC_MSG_ERROR([*** libloc could not be found])]])
CFLAGS="${CFLAGS} ${LIBLOC_CFLAGS}"
LIBS="${LIBS} ${LIBLOC_LIBS}"
fi

# libmaxminddb
AC_ARG_ENABLE(geoip,
AS_HELP_STRING([--enable-geoip],[Enable GeoIP2 support]),
Expand Down Expand Up @@ -2532,6 +2545,7 @@ SURICATA_BUILD_CONF="Suricata Configuration:
PCRE jit: ${pcre2_jit_available}
LUA support: ${enable_lua}
libluajit: ${enable_luajit}
IPFire Location support: ${enable_libloc}
GeoIP2 support: ${enable_geoip}
Non-bundled htp: ${enable_non_bundled_htp}
Hyperscan support: ${enable_hyperscan}
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.am
Expand Up @@ -234,6 +234,7 @@ noinst_HEADERS = \
detect-krb5-msgtype.h \
detect-krb5-sname.h \
detect-l3proto.h \
detect-location.h \
detect-lua-extensions.h \
detect-lua.h \
detect-mark.h \
Expand Down Expand Up @@ -810,6 +811,7 @@ libsuricata_c_a_SOURCES = \
detect-krb5-msgtype.c \
detect-krb5-sname.c \
detect-l3proto.c \
detect-location.c \
detect-lua.c \
detect-lua-extensions.c \
detect-mark.c \
Expand Down
2 changes: 2 additions & 0 deletions src/detect-engine-register.c
Expand Up @@ -217,6 +217,7 @@
#include "detect-mqtt-publish-message.h"
#include "detect-mqtt-subscribe-topic.h"
#include "detect-mqtt-unsubscribe-topic.h"
#include "detect-location.h"

#include "detect-template-buffer.h"
#include "detect-bypass.h"
Expand Down Expand Up @@ -643,6 +644,7 @@ void SigTableSetup(void)
DetectMQTTPublishMessageRegister();
DetectMQTTSubscribeTopicRegister();
DetectMQTTUnsubscribeTopicRegister();
DetectLocationRegister();

DetectTemplateBufferRegister();
DetectBypassRegister();
Expand Down
3 changes: 3 additions & 0 deletions src/detect-engine-register.h
Expand Up @@ -98,6 +98,9 @@ enum DetectKeywordId {
DETECT_DETECTION_FILTER,
DETECT_DATASET,
DETECT_DATAREP,
DETECT_ANONYMOUS_PROXY,
DETECT_SATELLITE_PROVIDER,
DETECT_ANYCAST,

DETECT_DECODE_EVENT,
DETECT_GID,
Expand Down