From 7c45afd592b0144f4549a85902e3aa378cfbe387 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 25 Mar 2008 08:49:21 +0000 Subject: IP2BIN filter convert IP address from host storage to a "binary" string which can be use by MySQL. This is not strictly speaking raw data but it was of type RAW. Following remark from Hugo Mildenberger, I introduce in this patch a dedicated type ULOGD_RET_RAWSTR. The main reason not to use a ULOGD_RET_STRING parameter is that the paramater is not human readable. Signed-off-by: Eric Leblond --- util/db.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'util/db.c') diff --git a/util/db.c b/util/db.c index d57ab6a..49f6c29 100644 --- a/util/db.c +++ b/util/db.c @@ -294,9 +294,12 @@ static int __interp_db(struct ulogd_pluginstance *upi) } sprintf(di->stmt_ins, "',"); break; - case ULOGD_RET_RAW: + case ULOGD_RET_RAWSTR: sprintf(di->stmt_ins, "%s,", res->u.value.ptr); break; + case ULOGD_RET_RAW: + ulogd_log(ULOGD_NOTICE, + "Unsupported RAW type is unsupported in SQL output"); default: ulogd_log(ULOGD_NOTICE, "unknown type %d for %s\n", -- cgit v1.2.3