From: Lorenzo Colitti <lorenzo@google.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org, jscherpelz@google.com,
subashab@codeaurora.org, zlpnobody@gmail.com
Subject: [PATCH iptables v2]: Support the iptables lock in ip[6]tables-restore
Date: Thu, 16 Mar 2017 16:55:00 +0900 [thread overview]
Message-ID: <20170316075502.2337-1-lorenzo@google.com> (raw)
This series adds support for -w and -W to ip[6]tables-restore,
which currently do not perform any locking.
The lock is not acquired on startup. Instead, it is acquired when
a new table handle is created (on encountering '*') and released
when the table is committed (COMMIT). This makes it possible to
keep long-running iptables-restore processes in the background
(for example, reading commands from a pipe opened by a system
management daemon) and simultaneously run iptables commands.
An example usage is Android's IptablesRestoreController.cpp.
The first patch factors out to common functions the code that
parses -w and -W, in order not to have to add more copies of it.
The second patch actually adds support to iptables-restore.
next reply other threads:[~2017-03-16 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 7:55 Lorenzo Colitti [this message]
2017-03-16 7:55 ` [PATCH iptables v2 1/2] iptables: remove duplicated argument parsing code Lorenzo Colitti
2017-03-17 13:14 ` Pablo Neira Ayuso
2017-03-16 7:55 ` [PATCH iptables v2 2/2] iptables-restore: support acquiring the lock Lorenzo Colitti
2017-03-17 13:20 ` Pablo Neira Ayuso
2017-03-17 16:46 ` Lorenzo Colitti
2017-03-21 13:54 ` 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=20170316075502.2337-1-lorenzo@google.com \
--to=lorenzo@google.com \
--cc=jscherpelz@google.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=subashab@codeaurora.org \
--cc=zlpnobody@gmail.com \
/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).