From 07a3a6fe92c98e251a464a5744421ce211030003 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Wed, 16 Apr 2008 15:37:39 +0000 Subject: add more verbose error notification when the injection of a conntrack fails --- src/cache_wt.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/cache_wt.c') diff --git a/src/cache_wt.c b/src/cache_wt.c index 65eb3fe..65a1fc4 100644 --- a/src/cache_wt.c +++ b/src/cache_wt.c @@ -35,16 +35,21 @@ static void add_wt(struct us_conntrack *u) switch (ret) { case -1: dlog(LOG_ERR, "cache_wt problem: %s", strerror(errno)); + dlog_ct(STATE(log), u->ct, NFCT_O_PLAIN); break; case 0: memcpy(ct, u->ct, nfct_maxsize()); - if (nl_create_conntrack(ct) == -1) + if (nl_create_conntrack(ct) == -1) { dlog(LOG_ERR, "cache_wt create: %s", strerror(errno)); + dlog_ct(STATE(log), u->ct, NFCT_O_PLAIN); + } break; case 1: memcpy(ct, u->ct, nfct_maxsize()); - if (nl_update_conntrack(ct) == -1) + if (nl_update_conntrack(ct) == -1) { dlog(LOG_ERR, "cache_wt crt-upd: %s", strerror(errno)); + dlog_ct(STATE(log), u->ct, NFCT_O_PLAIN); + } break; } } @@ -56,8 +61,10 @@ static void upd_wt(struct us_conntrack *u) memcpy(ct, u->ct, nfct_maxsize()); - if (nl_update_conntrack(ct) == -1) + if (nl_update_conntrack(ct) == -1) { dlog(LOG_ERR, "cache_wt update:%s", strerror(errno)); + dlog_ct(STATE(log), u->ct, NFCT_O_PLAIN); + } } static void writethrough_add(struct us_conntrack *u, void *data) -- cgit v1.2.3