summaryrefslogtreecommitdiffstats
path: root/util/db.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-03-25 08:49:21 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-03-25 08:49:21 +0000
commit7c45afd592b0144f4549a85902e3aa378cfbe387 (patch)
treebc4d8a7c5d308cfd45b2f37e860293e259e11edc /util/db.c
parent577fb57ee6d8c1be008663b979b28a8ad9f41a26 (diff)
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 <eric@inl.fr>
Diffstat (limited to 'util/db.c')
-rw-r--r--util/db.c5
1 files changed, 4 insertions, 1 deletions
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",