From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH v2 2/2] nfnl_osf: Improve error handling
Date: Mon, 18 May 2020 17:38:42 +0200 [thread overview]
Message-ID: <20200518153842.GK31506@orbyte.nwl.cc> (raw)
In-Reply-To: <20200515140330.13669-3-phil@nwl.cc>
Two minor nits during final review:
On Fri, May 15, 2020 at 04:03:30PM +0200, Phil Sutter wrote:
[...]
> ---
> Changes since v1:
> - Don't use ulog_err() when complaining about missing fingerprints
> argument, the use of strerror() with zero errno is misleading.
> - Don't print error on osf_load_line() failure when deleting and errno
> is ENOENT. Upon add, NLM_F_EXCL is not set so EEXIST is basically
> ignored, be equally error-tolerant upon deletion.
This change didn't make it into the commit message, although it's worth
mentioning.
[...]
> @@ -414,9 +416,11 @@ static int osf_load_entries(char *path, int del)
>
> buf[len] = '\0';
>
> - err = osf_load_line(buf, len, del);
> - if (err)
> - break;
> + rc = osf_load_line(buf, len, del);
> + if (rc && (!del || errno == ENOENT)) {
Stupid typo here, it should read 'errno != ENOENT'.
I'll fix both before pushing upstream.
Cheers, Phil
next prev parent reply other threads:[~2020-05-18 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 14:03 [iptables PATCH v2 0/2] Critical: Unbreak nfnl_osf tool Phil Sutter
2020-05-15 14:03 ` [iptables PATCH v2 1/2] nfnl_osf: Fix broken conversion to nfnl_query() Phil Sutter
2020-05-15 14:03 ` [iptables PATCH v2 2/2] nfnl_osf: Improve error handling Phil Sutter
2020-05-18 15:38 ` Phil Sutter [this message]
2020-05-18 14:57 ` [iptables PATCH v2 0/2] Critical: Unbreak nfnl_osf tool 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=20200518153842.GK31506@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).