Files
linux-stable-mirror/include/linux
Pablo Neira Ayuso d214c7537b filter: add SKF_AD_NLATTR_NEST to look for nested attributes
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.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 00:49:27 -08:00
..
2008-10-22 01:19:37 +02:00
2008-10-30 11:38:47 -07:00
2008-10-31 00:56:49 -07:00
2008-11-11 21:15:50 -05:00
2008-10-20 11:01:52 -07:00
2008-10-20 08:52:42 -07:00
2008-11-06 08:41:55 +01:00
2008-10-20 08:52:32 -07:00
2008-11-12 17:17:18 -08:00
2008-10-30 11:38:45 -07:00
2008-11-16 22:55:08 -08:00
2008-10-30 11:38:45 -07:00
2008-10-23 16:00:24 +02:00
2008-10-22 20:21:33 +02:00
2008-10-29 22:02:09 +01:00
2008-11-03 18:21:45 +01:00
2008-10-28 14:22:15 +02:00
2008-10-20 22:34:12 +01:00
2008-10-20 08:52:31 -07:00
2008-10-20 08:52:30 -07:00
2008-10-22 10:00:23 +11:00
2008-11-06 15:41:21 -08:00
2008-11-19 21:40:23 -08:00
2008-10-20 08:52:32 -07:00
2008-10-22 16:42:43 -07:00
2008-11-07 22:56:00 -08:00
2008-10-23 00:11:07 -04:00
2008-10-23 18:54:05 +04:00
2008-10-20 08:52:39 -07:00
2008-11-12 17:17:17 -08:00
2008-11-16 19:39:21 -08:00
2008-10-20 08:52:40 -07:00
2008-10-30 11:38:47 -07:00
2008-10-31 19:02:14 -04:00
2008-11-13 20:49:02 +02:00
2008-11-02 10:15:07 -08:00
2008-10-20 08:52:31 -07:00
2008-11-07 16:09:23 +01:00