ulogd: bump to version 2.0.7
It's been quite a long time since there was a release, and this one includes quite a bit of fixes/updates. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
parent
ffcb3516b5
commit
e947914286
3 changed files with 8 additions and 96 deletions
|
@ -8,15 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ulogd
|
PKG_NAME:=ulogd
|
||||||
PKG_VERSION:=2.0.5
|
PKG_VERSION:=2.0.7
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
|
PKG_SOURCE_URL:=https://netfilter.org/projects/ulogd/files/ \
|
||||||
ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
|
ftp://ftp.netfilter.org/pub/ulogd/
|
||||||
ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
|
PKG_HASH:=990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b
|
||||||
ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
|
|
||||||
PKG_HASH:=a221cb9f77347c0ca00d0937e27c1b90e3291a553cc62a4139b788e2e420e8c0
|
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -141,7 +139,9 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-mysql),)
|
ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-mysql),)
|
||||||
CONFIGURE_ARGS += --with-mysql="$(STAGING_DIR)/usr"
|
CONFIGURE_ARGS += \
|
||||||
|
--with-mysql-inc=$(STAGING_DIR)/usr/include/mysql \
|
||||||
|
--with-mysql-lib=$(STAGING_DIR)/usr/lib/mysql
|
||||||
else
|
else
|
||||||
CONFIGURE_ARGS += --without-mysql
|
CONFIGURE_ARGS += --without-mysql
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
--- a/src/ulogd.c
|
|
||||||
+++ b/src/ulogd.c
|
|
||||||
@@ -83,7 +83,7 @@ static char *ulogd_logfile = NULL;
|
|
||||||
static const char *ulogd_configfile = ULOGD_CONFIGFILE;
|
|
||||||
static const char *ulogd_pidfile = NULL;
|
|
||||||
static int ulogd_pidfile_fd = -1;
|
|
||||||
-static FILE syslog_dummy;
|
|
||||||
+static int ulogd_use_syslog = 0;
|
|
||||||
|
|
||||||
static int info_mode = 0;
|
|
||||||
|
|
||||||
@@ -427,7 +427,7 @@ void __ulogd_log(int level, char *file,
|
|
||||||
if (level < loglevel_ce.u.value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (logfile == &syslog_dummy) {
|
|
||||||
+ if (ulogd_use_syslog) {
|
|
||||||
/* FIXME: this omits the 'file' string */
|
|
||||||
va_start(ap, format);
|
|
||||||
vsyslog(ulogd2syslog_level(level), format, ap);
|
|
||||||
@@ -950,7 +950,7 @@ static int logfile_open(const char *name
|
|
||||||
logfile = stdout;
|
|
||||||
} else if (!strcmp(name, "syslog")) {
|
|
||||||
openlog("ulogd", LOG_PID, LOG_DAEMON);
|
|
||||||
- logfile = &syslog_dummy;
|
|
||||||
+ ulogd_use_syslog = 1;
|
|
||||||
} else {
|
|
||||||
logfile = fopen(ulogd_logfile, "a");
|
|
||||||
if (!logfile) {
|
|
||||||
@@ -1240,7 +1240,7 @@ static void sigterm_handler(int signal)
|
|
||||||
unload_plugins();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
|
|
||||||
+ if (logfile != NULL && logfile != stdout) {
|
|
||||||
fclose(logfile);
|
|
||||||
logfile = NULL;
|
|
||||||
}
|
|
||||||
@@ -1262,7 +1262,7 @@ static void signal_handler(int signal)
|
|
||||||
switch (signal) {
|
|
||||||
case SIGHUP:
|
|
||||||
/* reopen logfile */
|
|
||||||
- if (logfile != stdout && logfile != &syslog_dummy) {
|
|
||||||
+ if (logfile != NULL && logfile != stdout) {
|
|
||||||
fclose(logfile);
|
|
||||||
logfile = fopen(ulogd_logfile, "a");
|
|
||||||
if (!logfile) {
|
|
||||||
--- a/filter/raw2packet/ulogd_raw2packet_BASE.c
|
|
||||||
+++ b/filter/raw2packet/ulogd_raw2packet_BASE.c
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#include <ulogd/ulogd.h>
|
|
||||||
#include <ulogd/ipfix_protocol.h>
|
|
||||||
#include <netinet/if_ether.h>
|
|
||||||
+#include <linux/types.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
enum input_keys {
|
|
|
@ -1,31 +0,0 @@
|
||||||
From e0c75c9d20b76ff3d496a776ce43341c752914c3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eric Leblond <eric@regit.org>
|
|
||||||
Date: Tue, 21 Mar 2017 21:49:46 +0100
|
|
||||||
Subject: [PATCH] ulogd: use strncpy instead of memcpy
|
|
||||||
|
|
||||||
On some architecture, ulogd is not starting due to a
|
|
||||||
crash in memcpy. This patch switches to strncpy to
|
|
||||||
avoid the problem.
|
|
||||||
|
|
||||||
Reported-by: Alexandru Ardelean <ardeleanalex@gmail.com>
|
|
||||||
Signed-off-by: Eric Leblond <eric@regit.org>
|
|
||||||
---
|
|
||||||
src/ulogd.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/ulogd.c b/src/ulogd.c
|
|
||||||
index 5b9a586..919a317 100644
|
|
||||||
--- a/src/ulogd.c
|
|
||||||
+++ b/src/ulogd.c
|
|
||||||
@@ -668,7 +668,7 @@ pluginstance_alloc_init(struct ulogd_plugin *pl, char *pi_id,
|
|
||||||
INIT_LLIST_HEAD(&pi->plist);
|
|
||||||
pi->plugin = pl;
|
|
||||||
pi->stack = stack;
|
|
||||||
- memcpy(pi->id, pi_id, sizeof(pi->id));
|
|
||||||
+ strncpy(pi->id, pi_id, ULOGD_MAX_KEYLEN);
|
|
||||||
|
|
||||||
ptr = (void *)pi + sizeof(*pi);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
Loading…
Reference in a new issue