From: Linus Torvalds <torvalds@osdl.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Tomasz Kvarsin <kvarsin@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
bunk@stusta.de,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netfilter@lists.netfilter.org,
netfilter-devel@lists.netfilter.org
Subject: Re: 2.6.20-rc4: regression: iptables failed to load rules
Date: Wed, 10 Jan 2007 08:15:55 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0701100803270.3594@woody.osdl.org> (raw)
In-Reply-To: <45A49C47.6080407@trash.net>
On Wed, 10 Jan 2007, Patrick McHardy wrote:
>
> In the x_tables case it really caused a lot of unnecessary confusion,
> the recent connection tracking changes however needed new config
> options since we're keeping the old implementation around for a few more
> releases.
It's too late now, but it _could_ have fairly easily been handled totally
differently: namely by having the user-visible config options be
INDEPENDENT of the actual back-end.
The Kconfig language is actually pretty powerful for configuration issues,
and the way to do this is relatively straightforward:
config CONNTRACK
tristate "Netfilter support"
...
config NEW_CONTRACK_SUPPORT
bool "Layer 3 Independent Connection tracking"
...
config CONNTRACK_MARK
bool 'Connection mark tracking support'
depends on CONNTRACK
...
config OLD_CONNTRACK_MARK
bool
depends on CONNTRACK_MARK && CONNTRACK && !NEW_CONTRACK_SUPPORT
default y
config NEW_CONNTRACK_MARK
bool
depends on CONNTRACK_MARK && CONNTRACK && NEW_CONTRACK_SUPPORT
default y
See? The _user_ just sees a single "CONNTRACK_MARK" option (that just
depends on the *generic* CONNTRACK config option), but then the Kconfig
file splits that into "OLD_CONNTRACK_MARK" or "NEW_CONNTRACK_MARK"
depending on whether "NEW_CONTRACK_SUPPORT" was set or not.
> It probably won't be necessary anymore to make changes like this in
> the future, but in case it is I'll make sure to at least provide
> compatibility options for a few releases.
In general, I'd much rather see the config options impact what the "user
experience" should be. Notice how the above does exactly that: all the
USER really cares about whether the connection marks are enabled or not,
and the "NEW_CONTRACK_SUPPORT" is _not_ part of the user-visible config
(apart from the _one_ question that asks about which implementation you
want to pick), but it is only used to pick which _implementation_ to
choose.
So making the Kconfig files more user-oriented and less implementation-
oriented automatically solves the problem with config options that change
names (because if the effect is the same, it should have the same name -
regardless of how it is implemented!).
Linus
next prev parent reply other threads:[~2007-01-10 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-09 7:29 2.6.20-rc4: regression: iptables failed to load rules Tomasz Kvarsin
2007-01-09 17:33 ` Linus Torvalds
2007-01-10 7:56 ` Patrick McHardy
2007-01-10 16:15 ` Linus Torvalds [this message]
2007-01-10 22:10 ` Bill Davidsen
2007-02-12 20:17 ` David Miller
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=Pine.LNX.4.64.0701100803270.3594@woody.osdl.org \
--to=torvalds@osdl.org \
--cc=bunk@stusta.de \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=kvarsin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=netfilter@lists.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).