From: James Chapman <jchapman@katalix.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v4] netfilter: introduce l2tp match extension
Date: Fri, 03 Jan 2014 10:04:46 +0000 [thread overview]
Message-ID: <52C68B3E.30402@katalix.com> (raw)
In-Reply-To: <20140102205713.GA3758@localhost>
On 02/01/14 20:57, Pablo Neira Ayuso wrote:
> Hi,
>
> On Thu, Dec 12, 2013 at 02:13:42PM +0000, James Chapman wrote:
> I'm testing this with the last userspace iptables patch that you
> posted [1]. I'm using the example in the manpage:
>
> # iptables -A INPUT -s 1.2.3.4 -m l2tp --tid 42
> iptables: Invalid argument. Run `dmesg' for more information.
> # dmesg
> ...
> [ 490.827569] xt_l2tp: missing encapsulation
By bad. I made the encap type a required param to the kernel as a result
of previous comments and updated the iptables patch to enforce this, but
I didn't submit the updated iptables patch.
> Note that changing the info data area from the kernel side is
> problematic in iptables, eg.
>
> # iptables -A INPUT -s 1.2.3.4/32 -m l2tp --tid 42 --pversion 2
> # iptables -D INPUT -s 1.2.3.4/32 -m l2tp --tid 42 --pversion 2
> iptables: Bad rule (does a matching rule exist in that chain?).
>
> Userspace needs to get exactly what it passes, no changes are allowed.
> I think you need explicit option passing to indicate the behaviour you
> want.
>
>> + }
>> + }
>> +
>> + /* Encap must be specified */
>> + if (!(info->flags & XT_L2TP_ENCAP))
>> + return -EINVAL;
>> +
>> + return 0;
>> +}
>
> Please, review this logic in the _check() function and send me a v5,
> including a refreshed iptables version.
On reflection, having the kernel derive an encap_type if the version is
set 2 is unnecessary - it is better to have the iptables command parser
do this and just have the kernel reject the request if encap_type is not
specified, rather than trying to fake it as being set to udp itself when
version is 2.
>
> It would be great if you can include a list of iptables commands using
> your l2tp match that you have used to validate this in the next round.
> Thanks.
Will do. Thanks.
> [1] http://patchwork.ozlabs.org/patch/288411/
>
prev parent reply other threads:[~2014-01-03 10:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 14:13 [PATCH v4] netfilter: introduce l2tp match extension James Chapman
2014-01-02 20:57 ` Pablo Neira Ayuso
2014-01-02 20:59 ` Pablo Neira Ayuso
2014-01-03 10:04 ` James Chapman [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=52C68B3E.30402@katalix.com \
--to=jchapman@katalix.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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.