diff options
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-04-16 15:37:39 +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-04-16 15:37:39 +0000 |
commit | 07a3a6fe92c98e251a464a5744421ce211030003 (patch) | |
tree | 17a3188f6032b03f9ccfb607e09e6589839de7b2 /src/cache_wt.c | |
parent | 92d2cadbac3e51f6da0a1628e0544ccbdea107ba (diff) | |
download | conntrack-tools-07a3a6fe92c98e251a464a5744421ce211030003.tar.gz conntrack-tools-07a3a6fe92c98e251a464a5744421ce211030003.zip |
add more verbose error notification when the injection of a conntrack fails
Diffstat (limited to 'src/cache_wt.c')
-rw-r--r-- | src/cache_wt.c | 13 |
1 files changed, 10 insertions, 3 deletions
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) |