From: David Miller <davem@davemloft.net>
To: kaber@trash.net
Cc: pablo@netfilter.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] filter: add SKF_AD_NLATTR_NEST to look for nested attributes
Date: Thu, 20 Nov 2008 00:49:35 -0800 (PST) [thread overview]
Message-ID: <20081120.004935.255394712.davem@davemloft.net> (raw)
In-Reply-To: <49229DAE.6060105@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Tue, 18 Nov 2008 11:49:18 +0100
> Pablo Neira Ayuso wrote:
> > SKF_AD_NLATTR allows us to find the first matching attribute in a
> > stream of netlink attributes from one offset to the end of the
> > netlink message. This is not suitable to look for a specific
> > matching inside a set of nested attributes.
> > For example, in ctnetlink messages, if we look for the CTA_V6_SRC
> > attribute in a message that talks about an IPv4 connection,
> > SKF_AD_NLATTR returns the offset of CTA_STATUS which has the same
> > value of CTA_V6_SRC but outside the nest. To differenciate
> > CTA_STATUS and CTA_V6_SRC, we would have to make assumptions on the
> > size of the attribute and the usual offset, resulting in horrible
> > BSF code.
> > This patch adds SKF_AD_NLATTR_NEST, which is a variant of
> > SKF_AD_NLATTR, that looks for an attribute inside the limits of
> > a nested attributes, but not further.
> > This patch validates that we have enough room to look for the
> > nested attributes - based on a suggestion from Patrick McHardy.
>
> Looks good, thanks Pablo.
>
> Acked-by: Patrick McHardy <kaber@trash.net>
Applied, thanks everyone.
next prev parent reply other threads:[~2008-11-20 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 3:01 [PATCH] filter: add SKF_AD_NLATTR_NEST to look for nested attributes Pablo Neira Ayuso
2008-11-18 10:49 ` Patrick McHardy
2008-11-20 8:49 ` David Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-11-17 8:31 Pablo Neira Ayuso
2008-11-17 8:36 ` David Miller
2008-11-17 14:35 ` 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=20081120.004935.255394712.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--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 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).