From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Lorenzo Colitti <lorenzo@google.com>
Cc: netfilter-devel@vger.kernel.org, jscherpelz@google.com,
subashab@codeaurora.org, dcbw@redhat.com, aconole@bytheb.org
Subject: Re: [PATCH] iptables: insist that the lock is held.
Date: Mon, 29 May 2017 14:02:32 +0200 [thread overview]
Message-ID: <20170529120232.GA11187@salvia> (raw)
In-Reply-To: <20170519070859.75808-1-lorenzo@google.com>
On Fri, May 19, 2017 at 04:08:59PM +0900, Lorenzo Colitti wrote:
> Currently, iptables programs will exit with an error if the
> iptables lock cannot be acquired, but will silently continue if
> the lock cannot be opened at all. This can cause unexpected
> failures (with unhelpful error messages) in the presence of
> concurrent updates, which can be very difficult to find in a
> complex or multi-administrator system.
>
> Instead, refuse to do anything if the lock cannot be acquired.
> The behaviour is not affected by command-line flags because:
>
> 1. In order to reliably avoid concurrent modification, all
> invocations of iptables commands must follow this behaviour.
> 2. Whether or not the lock can be opened is typically not
> a run-time condition but is likely to be a configuration
> error.
>
> Existing systems that depended on things working mostly correctly
> even if there was no lock might be affected by this change.
> However, that is arguably a configuration error, and now that the
> iptables lock is configurable, it is trivial to provide a lock
> file that is always accessible: if nothing else, the iptables
> binary itself can be used. The lock does not have to be writable,
> only readable.
>
> Tested by configuring the system to use an xtables.lock file in
> a non-existent directory and observing that all commands failed.
Applied, thanks Lorenzo.
prev parent reply other threads:[~2017-05-29 12:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 7:08 [PATCH] iptables: insist that the lock is held Lorenzo Colitti
2017-05-29 12:02 ` Pablo Neira Ayuso [this message]
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=20170529120232.GA11187@salvia \
--to=pablo@netfilter.org \
--cc=aconole@bytheb.org \
--cc=dcbw@redhat.com \
--cc=jscherpelz@google.com \
--cc=lorenzo@google.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=subashab@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.