netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Crosser <crosser@average.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft v2 0/2] Improve handling of errors from mnl* functions"
Date: Thu,  9 Dec 2021 19:26:05 +0100	[thread overview]
Message-ID: <20211209182607.18550-1-crosser@average.org> (raw)

   Version 2 of the patchset

Libnftables does not handle errors that libmnl functions may return
properly:

1. Retriable errors indicated by errno=EINTR are not retried, but
   rather treted as fatal.
2. Instead of reporting the error to the caller, functions call
   exit() on error, which terminates the caller process.

This patch set partly addresses the second point, by calling
abort() instead of exit() on ABI error, that will at least give
more information to the sysadmin than quiet termination of a
process.

It attempts to properly address the first point, by introducing
retry logic when mnl_socket_recvfrom() or mnl_cb_run() return
-1 with errno=EINTR.

It would be desirable to fully address the second point at some
future time, though it requires some redesign of the code structure.

  [PATCH nft v2 1/2] Use abort() in case of netlink_abi_error
  [PATCH nft v2 2/2] Handle retriable errors from mnl functions


             reply	other threads:[~2021-12-09 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 18:26 Eugene Crosser [this message]
2021-12-09 18:26 ` [PATCH nft v2 1/2] Use abort() in case of netlink_abi_error Eugene Crosser
2022-01-26  1:11   ` Pablo Neira Ayuso
2021-12-09 18:26 ` [PATCH nft v2 2/2] Handle retriable errors from mnl functions Eugene Crosser
2022-01-27 18:20   ` Pablo Neira Ayuso
2022-01-27 18:39     ` Eugene Crosser
2022-01-27 23:04       ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211209182607.18550-1-crosser@average.org \
    --to=crosser@average.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).