summaryrefslogtreecommitdiffstats
path: root/src/conntrack.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2013-09-05 11:27:50 +0200
committerFlorian Westphal <fw@strlen.de>2013-09-15 12:08:47 +0200
commitfee95ed0db0745b551dfb15c58800da5c1ca9e5f (patch)
tree0b41b513e13701a9da9a3af492f7bddea8a0af5a /src/conntrack.c
parent991fc4ae561bfc7c9bc9da9598b0cc704295811f (diff)
conntrack: do not exit when update returns an error
If we fail to update an entry, just try to continue with the next one instead of exiting. Can happen f.e. when using "conntrack -U --add-label bla", but the conntrack entry in the kernel does not have the label extension set. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/conntrack.c')
-rw-r--r--src/conntrack.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/conntrack.c b/src/conntrack.c
index 404ecc9..1e45ca8 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -1492,12 +1492,10 @@ static int update_cb(enum nf_conntrack_msg_type type,
}
res = nfct_query(ith, NFCT_Q_UPDATE, tmp);
- if (res < 0) {
- nfct_destroy(tmp);
- exit_error(OTHER_PROBLEM,
- "Operation failed: %s",
+ if (res < 0)
+ fprintf(stderr,
+ "Operation failed: %s\n",
err2str(errno, CT_UPDATE));
- }
nfct_callback_register(ith, NFCT_T_ALL, print_cb, NULL);
res = nfct_query(ith, NFCT_Q_GET, tmp);