From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: 4/7 [NETFILTER]: xt_length match, revision 1
Date: Thu, 04 Sep 2008 17:58:22 +0200 [thread overview]
Message-ID: <48C0059E.1080602@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0809041154090.7250@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> On Thursday 2008-09-04 10:56, Patrick McHardy wrote:
>>> [NETFILTER]: xt_length match, revision 1
>>>
>>> Introduce xt_length match revision 1. It adds support for layer-4,
>>> layer-5 and layer-7 length matching. It is much easier than writing
>>> up the according xt_u32 magic.
>> I still think this is too ugly to live
>
> Do you have a better suggestion?
Not currently, too busy catching up. Lets revisit this later.
>
>>> +static bool
>>> +xtlength_layer7_sctp(unsigned int *length, const struct sk_buff *skb,
>>> + unsigned int offset)
>>> +{
>>> + const struct sctp_chunkhdr *ch;
>>> + struct sctp_chunkhdr chbuf;
>>> + unsigned int pos;
>>> +
>>> + *length = 0;
>>> + for (pos = sizeof(struct sctphdr); pos < skb->len;
>>> + pos += ntohs(ch->length)) {
>> Endless loop
>
> It should have been
> pos = offset + sizeof(struct sctphdr)
> right? If not, where is the endless loop?
ch->length may be zero. It should round up to multiples of four.
next prev parent reply other threads:[~2008-09-04 15:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 23:25 1/7 [NETFILTER]: Use unsigned types for hooknum and pf vars Jan Engelhardt
2008-08-13 23:27 ` 2/7 [NETFILTER]: Rename ipt_recent to xt_recent Jan Engelhardt
2008-09-04 14:45 ` Patrick McHardy
2008-08-13 23:27 ` 3/7 [NETFILTER]: xt_recent: IPv6 support Jan Engelhardt
2008-09-04 14:48 ` Patrick McHardy
2008-08-13 23:27 ` 4/7 [NETFILTER]: xt_length match, revision 1 Jan Engelhardt
2008-09-04 14:56 ` Patrick McHardy
2008-09-04 15:56 ` Jan Engelhardt
2008-09-04 15:58 ` Patrick McHardy [this message]
2008-08-13 23:42 ` 5/7 [NETFILTER]: Introduce NFPROTO_* constants Jan Engelhardt
2008-09-04 14:59 ` Patrick McHardy
2008-08-13 23:43 ` 6/7 [NETFILTER]: Use NFPROTO_* in extensions Jan Engelhardt
2008-09-04 15:05 ` Patrick McHardy
2008-09-04 16:01 ` Patrick McHardy
2008-08-13 23:44 ` 7/7 [NETFILTER]: Implement NFPROTO_UNSPEC as a wildcard for extensions Jan Engelhardt
2008-09-04 15:10 ` Patrick McHardy
2008-09-04 15:41 ` Jan Engelhardt
2008-09-04 14:34 ` 1/7 [NETFILTER]: Use unsigned types for hooknum and pf vars Patrick McHardy
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=48C0059E.1080602@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.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