From fee95ed0db0745b551dfb15c58800da5c1ca9e5f Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 5 Sep 2013 11:27:50 +0200 Subject: 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 --- src/conntrack.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/conntrack.c') 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); -- cgit v1.2.3