From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables (nft-compat) PATCH 8/8] nft: Initialize according to requested table, if any
Date: Tue, 11 Feb 2014 15:44:10 +0100 [thread overview]
Message-ID: <20140211144410.GA12972@localhost> (raw)
In-Reply-To: <52FA2791.3050009@linux.intel.com>
On Tue, Feb 11, 2014 at 03:37:21PM +0200, Tomasz Bursztyka wrote:
> Hi Pablo,
>
> >Does it work the autochain load if you reload with rules in different
> >tables? eg. filter and raw.
>
> Indeed, no... While chasing a bug (patch 7 is the result) I forgot
> to do this simple test.
>
> I could overload struct builtin_table {} for that.
> But I just figured out another issue here, it will work if only we
> don't have /etc/xtables.conf file.
This is the way it should work with the file. That file provides a way
to enforce a chain configuration that will bypass the default chain
configuration.
> If you have such file, when xtables-restore will insert rules, it
> will always call nft_xtables_config_load() thus always trying to
> initialize tables that might be already there.
For xtables-restore, I think we should just initialize the chains once
when handling the ':' marker that we get from the standard input that
refers to the chain. With patch 7/8, we know if we're in the context
of a restore or not, thus you can use that to skip any sort of
chain initialization from the functions defined in nft.c.
> So there is a bigger fix here: I will add necessary stuff in handle
> to keep track of parsed file like tables and store which one has
> been initialized and not.
I think with the approach I'm describing above the patch should be
relatively small.
prev parent reply other threads:[~2014-02-11 14:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 10:46 [libnftnl/iptables PATCH 0/8] Various fixes Tomasz Bursztyka
2014-02-11 10:46 ` [libnftnl PATCH 1/8] chain: Break the line properly when printing out the chain Tomasz Bursztyka
2014-02-11 10:58 ` Pablo Neira Ayuso
2014-02-11 11:29 ` Tomasz Bursztyka
2014-02-11 11:47 ` Pablo Neira Ayuso
2014-02-11 10:46 ` [libnftnl PATCH 2/8] table: Break the line properly when printing out the table Tomasz Bursztyka
2014-02-11 10:46 ` [iptables (nft-compat) PATCH 3/8] xtables: Handle family is not related to Netlink family Tomasz Bursztyka
2014-02-11 11:02 ` Pablo Neira Ayuso
2014-02-11 11:13 ` Tomasz Bursztyka
2014-02-11 11:23 ` Pablo Neira Ayuso
2014-02-11 11:28 ` Tomasz Bursztyka
2014-02-11 10:46 ` [iptables (nft-compat) PATCH 4/8] xtables: Add backward compatibility with -w option Tomasz Bursztyka
2014-02-11 11:09 ` Pablo Neira Ayuso
2014-02-11 10:46 ` [iptables (nft-compat) PATCH 5/8] nft: Fix error message to output proper origin Tomasz Bursztyka
2014-02-11 11:05 ` Pablo Neira Ayuso
2014-02-11 10:46 ` [iptables (nft-compat) PATCH 6/8] nft: Add useful debug output when a builtin table is created Tomasz Bursztyka
2014-02-11 10:46 ` [iptables (nft-compat) PATCH 7/8] nft: A builtin chain might be created when restoring Tomasz Bursztyka
2014-02-11 10:46 ` [iptables (nft-compat) PATCH 8/8] nft: Initialize according to requested table, if any Tomasz Bursztyka
2014-02-11 13:07 ` Pablo Neira Ayuso
2014-02-11 13:37 ` Tomasz Bursztyka
2014-02-11 14:44 ` 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=20140211144410.GA12972@localhost \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=tomasz.bursztyka@linux.intel.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).