From: Anders Fugmann <afu@fugmann.dhs.org>
To: Harald Welte <laforge@gnumonks.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Fixed proken MARK target in POM.
Date: Sun, 12 Jan 2003 20:58:02 +0100 [thread overview]
Message-ID: <3E21C8CA.3070207@fugmann.dhs.org> (raw)
In-Reply-To: <20030111191647.GD24488@naboo.de.gnumonks.org>
Harald Welte wrote:
>>Are defines tolerated? Something like:
>>#define MARK_BITOPS
>>
>>and then in the userspace do a:
>>#ifdef MARK_BITOPS
>>Whenever the new fileds in the structure is used.
>
>
> I don't understand how this could solve the problem. #defines are about
> compile time. We need one runtime iptables that copes with old and new
> kernels (and vice-versa).
I can see a way to make it somewhat compatible.
Kernel:
Make a totally new structure (Keep the old one for compability)
When checkentry is called, examine the size of argument:
If it equals the old size, set a module-global variable
meaning that the module should run in compability mode.
Othervice use the new structure.
This should sort out kernel compability with whatever iptables version.
Userspace:
This is a bit more tricky, as compability is defined by compile time.
That is, if iptables is compiled against 2.4.21 with the new MARK
target, it will not work with a kernel without the MARK target. If this
is acceptable, then a #define MARK_BITOPS can help solve the userspace
compability. Something like
#ifdef MARK_BITOPS
Accept --or-mark and --and-mark, and use the new structure.
#else
Only accept --set-mark and usethe old structure.
#endif
Is this acceptable (no backward compability with iptables - it only
works with the kernel its compiled against and newer, but not older)?
>
> We have quite a couple of other cases where we have the same problem -
> without any solution :(( But during a stable kernel series, we cannot
> put compatibility aside. People are not supposed to upgrade their
> iptables after they upgraded their kernel...
If the above procedure is acceptable, then it migh be a template for
such updates in the stable kernel series. It is important that the old
structures are removed for 2.6 though.
Regards
Anders Fugmann
next prev parent reply other threads:[~2003-01-12 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-09 13:07 Fixed proken MARK target in POM Anders Fugmann
2003-01-10 14:00 ` Harald Welte
2003-01-10 15:28 ` Anders Fugmann
2003-01-10 16:38 ` Anders Fugmann
2003-01-11 19:16 ` Harald Welte
2003-01-12 19:58 ` Anders Fugmann [this message]
2003-01-11 19:23 ` Harald Welte
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=3E21C8CA.3070207@fugmann.dhs.org \
--to=afu@fugmann.dhs.org \
--cc=laforge@gnumonks.org \
--cc=netfilter-devel@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 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.