aboutsummaryrefslogtreecommitdiff
path: root/net/ulogd/patches
diff options
context:
space:
mode:
Diffstat (limited to 'net/ulogd/patches')
-rw-r--r--net/ulogd/patches/010-json-remote.patch19
-rw-r--r--net/ulogd/patches/020-fix-musl.patch5
-rw-r--r--net/ulogd/patches/030-ipfix-add.patch25
-rw-r--r--net/ulogd/patches/040-ipfix-template.patch29
4 files changed, 17 insertions, 61 deletions
diff --git a/net/ulogd/patches/010-json-remote.patch b/net/ulogd/patches/010-json-remote.patch
index a250e0631..e217a11d8 100644
--- a/net/ulogd/patches/010-json-remote.patch
+++ b/net/ulogd/patches/010-json-remote.patch
@@ -13,8 +13,6 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
ulogd.conf.in | 11 ++
2 files changed, 281 insertions(+), 21 deletions(-)
-diff --git a/output/ulogd_output_JSON.c b/output/ulogd_output_JSON.c
-index 4d8e3e9..6edfa90 100644
--- a/output/ulogd_output_JSON.c
+++ b/output/ulogd_output_JSON.c
@@ -20,10 +20,15 @@
@@ -70,7 +68,7 @@ index 4d8e3e9..6edfa90 100644
JSON_CONF_MAX
};
-@@ -95,15 +116,167 @@ static struct config_keyset json_kset = {
+@@ -95,15 +116,167 @@ static struct config_keyset json_kset =
.options = CONFIG_OPT_NONE,
.u = { .value = 0 },
},
@@ -238,7 +236,7 @@ index 4d8e3e9..6edfa90 100644
json_t *msg;
msg = json_object();
-@@ -218,34 +391,65 @@ static int json_interp(struct ulogd_pluginstance *upi)
+@@ -218,34 +391,65 @@ static int json_interp(struct ulogd_plug
}
}
@@ -320,7 +318,7 @@ index 4d8e3e9..6edfa90 100644
break;
default:
break;
-@@ -255,6 +459,8 @@ static void sighup_handler_print(struct ulogd_pluginstance *upi, int signal)
+@@ -255,6 +459,8 @@ static void sighup_handler_print(struct
static int json_configure(struct ulogd_pluginstance *upi,
struct ulogd_pluginstance_stack *stack)
{
@@ -329,7 +327,7 @@ index 4d8e3e9..6edfa90 100644
int ret;
ret = ulogd_wildcard_inputkeys(upi);
-@@ -265,13 +471,25 @@ static int json_configure(struct ulogd_pluginstance *upi,
+@@ -265,13 +471,25 @@ static int json_configure(struct ulogd_p
if (ret < 0)
return ret;
@@ -357,7 +355,7 @@ index 4d8e3e9..6edfa90 100644
op->of = fopen(upi->config_kset->ces[0].u.string, "a");
if (!op->of) {
-@@ -280,6 +498,27 @@ static int json_init(struct ulogd_pluginstance *upi)
+@@ -280,6 +498,27 @@ static int json_init(struct ulogd_plugin
return -1;
}
@@ -385,7 +383,7 @@ index 4d8e3e9..6edfa90 100644
/* search for time */
op->sec_idx = -1;
op->usec_idx = -1;
-@@ -293,15 +532,25 @@ static int json_init(struct ulogd_pluginstance *upi)
+@@ -293,15 +532,25 @@ static int json_init(struct ulogd_plugin
*op->cached_tz = '\0';
@@ -414,8 +412,6 @@ index 4d8e3e9..6edfa90 100644
return 0;
}
-diff --git a/ulogd.conf.in b/ulogd.conf.in
-index 62222db..99cfc24 100644
--- a/ulogd.conf.in
+++ b/ulogd.conf.in
@@ -213,6 +213,17 @@ sync=1
@@ -436,6 +432,3 @@ index 62222db..99cfc24 100644
[pcap1]
#default file is /var/log/ulogd.pcap
---
-cgit v1.2.1
-
diff --git a/net/ulogd/patches/020-fix-musl.patch b/net/ulogd/patches/020-fix-musl.patch
index 592429a6d..afbc64cf4 100644
--- a/net/ulogd/patches/020-fix-musl.patch
+++ b/net/ulogd/patches/020-fix-musl.patch
@@ -12,8 +12,6 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/ulogd.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/src/ulogd.c b/src/ulogd.c
-index b8bc57c..9cd64e8 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -65,6 +65,7 @@
@@ -24,6 +22,3 @@ index b8bc57c..9cd64e8 100644
#include <ulogd/conffile.h>
#include <ulogd/ulogd.h>
#ifdef DEBUG
---
-cgit v1.2.1
-
diff --git a/net/ulogd/patches/030-ipfix-add.patch b/net/ulogd/patches/030-ipfix-add.patch
index ec42c66e3..13d1472c9 100644
--- a/net/ulogd/patches/030-ipfix-add.patch
+++ b/net/ulogd/patches/030-ipfix-add.patch
@@ -68,11 +68,9 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
create mode 100644 output/ipfix/ulogd_output_IPFIX.c
delete mode 100644 output/ulogd_output_IPFIX.c
-diff --git a/configure.ac b/configure.ac
-index 3aa0624..48b4995 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -179,7 +179,7 @@ AC_CONFIG_FILES(include/Makefile include/ulogd/Makefile include/libipulog/Makefi
+@@ -179,7 +179,7 @@ AC_CONFIG_FILES(include/Makefile include
input/sum/Makefile \
filter/Makefile filter/raw2packet/Makefile filter/packet2flow/Makefile \
output/Makefile output/pcap/Makefile output/mysql/Makefile output/pgsql/Makefile output/sqlite3/Makefile \
@@ -81,8 +79,6 @@ index 3aa0624..48b4995 100644
src/Makefile Makefile Rules.make)
AC_OUTPUT
-diff --git a/include/ulogd/ulogd.h b/include/ulogd/ulogd.h
-index 2e38195..1636a8c 100644
--- a/include/ulogd/ulogd.h
+++ b/include/ulogd/ulogd.h
@@ -28,6 +28,11 @@
@@ -97,11 +93,9 @@ index 2e38195..1636a8c 100644
#define ULOGD_RET_INT8 0x0001
#define ULOGD_RET_INT16 0x0002
-diff --git a/output/Makefile.am b/output/Makefile.am
-index ff851ad..7ba8217 100644
--- a/output/Makefile.am
+++ b/output/Makefile.am
-@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS} \
+@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include ${
${LIBNETFILTER_CONNTRACK_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
@@ -110,9 +104,6 @@ index ff851ad..7ba8217 100644
pkglib_LTLIBRARIES = ulogd_output_LOGEMU.la ulogd_output_SYSLOG.la \
ulogd_output_OPRINT.la ulogd_output_GPRINT.la \
-diff --git a/output/ipfix/Makefile.am b/output/ipfix/Makefile.am
-new file mode 100644
-index 0000000..cacda26
--- /dev/null
+++ b/output/ipfix/Makefile.am
@@ -0,0 +1,7 @@
@@ -123,9 +114,6 @@ index 0000000..cacda26
+
+ulogd_output_IPFIX_la_SOURCES = ulogd_output_IPFIX.c ipfix.c
+ulogd_output_IPFIX_la_LDFLAGS = -avoid-version -module
-diff --git a/output/ipfix/ipfix.c b/output/ipfix/ipfix.c
-new file mode 100644
-index 0000000..60a4c7f
--- /dev/null
+++ b/output/ipfix/ipfix.c
@@ -0,0 +1,141 @@
@@ -270,9 +258,6 @@ index 0000000..60a4c7f
+
+ return sizeof(struct vy_ipfix_data);
+}
-diff --git a/output/ipfix/ipfix.h b/output/ipfix/ipfix.h
-new file mode 100644
-index 0000000..cdb5a6f
--- /dev/null
+++ b/output/ipfix/ipfix.h
@@ -0,0 +1,89 @@
@@ -365,9 +350,6 @@ index 0000000..cdb5a6f
+int ipfix_dump_msg(const struct ipfix_msg *);
+
+#endif /* IPFIX_H */
-diff --git a/output/ipfix/ulogd_output_IPFIX.c b/output/ipfix/ulogd_output_IPFIX.c
-new file mode 100644
-index 0000000..ec143b1
--- /dev/null
+++ b/output/ipfix/ulogd_output_IPFIX.c
@@ -0,0 +1,503 @@
@@ -874,6 +856,3 @@ index 0000000..ec143b1
+{
+ ulogd_register_plugin(&ipfix_plugin);
+}
---
-cgit v1.2.1
-
diff --git a/net/ulogd/patches/040-ipfix-template.patch b/net/ulogd/patches/040-ipfix-template.patch
index c6ac601bf..c7b9d8eeb 100644
--- a/net/ulogd/patches/040-ipfix-template.patch
+++ b/net/ulogd/patches/040-ipfix-template.patch
@@ -27,8 +27,6 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
output/ipfix/ulogd_output_IPFIX.c | 56 ++++++++++++----------
4 files changed, 139 insertions(+), 37 deletions(-)
-diff --git a/include/ulogd/ipfix_protocol.h b/include/ulogd/ipfix_protocol.h
-index aef47f0..01dd96a 100644
--- a/include/ulogd/ipfix_protocol.h
+++ b/include/ulogd/ipfix_protocol.h
@@ -129,6 +129,7 @@ enum {
@@ -39,8 +37,6 @@ index aef47f0..01dd96a 100644
IPFIX_bgpNextAdjacentAsNumber = 128,
IPFIX_bgpPrevAdjacentAsNumber = 129,
IPFIX_exporterIPv4Address = 130,
-diff --git a/output/ipfix/ipfix.c b/output/ipfix/ipfix.c
-index 60a4c7f..4bb432a 100644
--- a/output/ipfix/ipfix.c
+++ b/output/ipfix/ipfix.c
@@ -2,6 +2,7 @@
@@ -56,7 +52,8 @@ index 60a4c7f..4bb432a 100644
#include <ulogd/ulogd.h>
#include <ulogd/common.h>
+#include <ulogd/ipfix_protocol.h>
-+
+
+-struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid)
+struct ipfix_templ_elem {
+ uint16_t id;
+ uint16_t len;
@@ -113,8 +110,7 @@ index 60a4c7f..4bb432a 100644
+ }
+ }
+};
-
--struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid)
++
+struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid, int tid)
{
struct ipfix_msg *msg;
@@ -162,7 +158,7 @@ index 60a4c7f..4bb432a 100644
return msg;
}
-@@ -47,6 +130,14 @@ void ipfix_msg_free(struct ipfix_msg *msg)
+@@ -47,6 +130,14 @@ void ipfix_msg_free(struct ipfix_msg *ms
free(msg);
}
@@ -177,8 +173,6 @@ index 60a4c7f..4bb432a 100644
struct ipfix_hdr *ipfix_msg_hdr(const struct ipfix_msg *msg)
{
return (struct ipfix_hdr *)msg->data;
-diff --git a/output/ipfix/ipfix.h b/output/ipfix/ipfix.h
-index cdb5a6f..93945fb 100644
--- a/output/ipfix/ipfix.h
+++ b/output/ipfix/ipfix.h
@@ -2,6 +2,7 @@
@@ -257,8 +251,6 @@ index cdb5a6f..93945fb 100644
size_t ipfix_msg_len(const struct ipfix_msg *);
void *ipfix_msg_data(struct ipfix_msg *);
struct ipfix_set_hdr *ipfix_msg_add_set(struct ipfix_msg *, uint16_t);
-diff --git a/output/ipfix/ulogd_output_IPFIX.c b/output/ipfix/ulogd_output_IPFIX.c
-index ec143b1..5b59003 100644
--- a/output/ipfix/ulogd_output_IPFIX.c
+++ b/output/ipfix/ulogd_output_IPFIX.c
@@ -3,6 +3,9 @@
@@ -313,7 +305,7 @@ index ec143b1..5b59003 100644
.ces = {
{
.key = "oid",
-@@ -70,20 +74,21 @@ static const struct config_keyset ipfix_kset = {
+@@ -70,20 +74,21 @@ static const struct config_keyset ipfix_
.key = "mtu",
.type = CONFIG_TYPE_INT,
.u.value = DEFAULT_MTU
@@ -340,7 +332,7 @@ index ec143b1..5b59003 100644
int proto;
struct ulogd_timer timer;
struct sockaddr_in sa;
-@@ -258,8 +263,8 @@ static void ipfix_timer_cb(struct ulogd_timer *t, void *data)
+@@ -258,8 +263,8 @@ static void ipfix_timer_cb(struct ulogd_
static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginstance_stack *stack)
{
struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
@@ -350,7 +342,7 @@ index ec143b1..5b59003 100644
char addr[16];
ret = config_parse_file(pi->id, pi->config_kset);
-@@ -271,6 +276,7 @@ static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginsta
+@@ -271,6 +276,7 @@ static int ipfix_configure(struct ulogd_
port = port_ce(pi->config_kset).u.value;
proto = proto_ce(pi->config_kset).u.string;
mtu = mtu_ce(pi->config_kset).u.value;
@@ -358,7 +350,7 @@ index ec143b1..5b59003 100644
if (!oid) {
ulogd_log(ULOGD_FATAL, "invalid Observation ID\n");
-@@ -303,6 +309,8 @@ static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginsta
+@@ -303,6 +309,8 @@ static int ipfix_configure(struct ulogd_
ulogd_init_timer(&priv->timer, pi, ipfix_timer_cb);
@@ -367,7 +359,7 @@ index ec143b1..5b59003 100644
ulogd_log(ULOGD_INFO, "using IPFIX Collector at %s:%d (MTU %d)\n",
inet_ntop(AF_INET, &priv->sa.sin_addr, addr, sizeof(addr)),
port, mtu);
-@@ -410,25 +418,30 @@ static int ipfix_stop(struct ulogd_pluginstance *pi)
+@@ -410,25 +418,30 @@ static int ipfix_stop(struct ulogd_plugi
static int ipfix_interp(struct ulogd_pluginstance *pi)
{
struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
@@ -427,6 +419,3 @@ index ec143b1..5b59003 100644
if ((ret = send_msgs(pi)) < 0)
return ret;
---
-cgit v1.2.1
-