Signed-off-by: Eric Leblond <eric@xxxxxxxxx> --- util/db.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util/db.c b/util/db.c index c23c362..6be06e6 100644 --- a/util/db.c +++ b/util/db.c @@ -177,9 +177,14 @@ int ulogd_db_configure(struct ulogd_pluginstance *upi, INIT_LLIST_HEAD(&di->backlog); di->backlog_memusage = 0; - + + di->ring.size = ringsize_ce(upi->config_kset).u.value; di->backlog_memcap = backlog_memcap_ce(upi->config_kset).u.value; - if (di->backlog_memcap > 0) { + + if (di->ring.size && di->backlog_memcap) { + ulogd_log(ULOGD_ERROR, "Ring buffer has precedence over backlog\n"); + di->backlog_memcap = 0; + } else if (di->backlog_memcap > 0) { di->backlog_oneshot = backlog_oneshot_ce(upi->config_kset).u.value; if (di->backlog_oneshot <= 2) { ulogd_log(ULOGD_ERROR, @@ -190,9 +195,6 @@ int ulogd_db_configure(struct ulogd_pluginstance *upi, di->backlog_full = 0; } - /* check ring option */ - di->ring.size = ringsize_ce(upi->config_kset).u.value; - return ret; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html