linux/net
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
..
9p 9p: restrict RDMA usage 2008-11-12 23:33:57 -08:00
802 net: '&' redux 2008-11-03 18:21:05 -08:00
8021q vlan: convert to net_device_ops 2008-11-19 22:42:41 -08:00
appletalk netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
atm netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
ax25 net: '&' redux 2008-11-03 18:21:05 -08:00
bluetooth netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
bridge bridge: convert to net_device_ops 2008-11-19 22:42:38 -08:00
can net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely) 2008-10-16 15:24:51 -07:00
core filter: add SKF_AD_NLATTR_NEST to look for nested attributes 2008-11-20 00:49:27 -08:00
dccp net: listening_hash get a spinlock per bucket 2008-11-20 00:40:07 -08:00
decnet net: remove struct dst_entry::entry_size 2008-11-11 17:25:22 -08:00
dsa Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
econet netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ethernet netdev: expose ethernet address primitives 2008-11-19 22:42:31 -08:00
ieee80211 wireless: fix two bad print_ssid conversions 2008-11-10 15:17:33 -05:00
ipv4 net: listening_hash get a spinlock per bucket 2008-11-20 00:40:07 -08:00
ipv6 net: listening_hash get a spinlock per bucket 2008-11-20 00:40:07 -08:00
ipx net: '&' redux 2008-11-03 18:21:05 -08:00
irda netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
iucv iucv: Fix mismerge again. 2008-09-30 03:03:35 -07:00
key af_key: mark policy as dead before destroying 2008-11-06 23:08:37 -08:00
lapb
llc net: '&' redux 2008-11-03 18:21:05 -08:00
mac80211 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-18 23:38:23 -08:00
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
netlabel net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
netlink netlink: constify struct nlattr * arg to parsing functions 2008-10-28 11:59:11 -07:00
netrom net: '&' redux 2008-11-03 18:21:05 -08:00
packet net: af_packet should update its inuse counter 2008-11-19 14:25:35 -08:00
phonet Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-18 23:38:23 -08:00
rfkill net: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-10 13:55:14 -08:00
rose net: '&' redux 2008-11-03 18:21:05 -08:00
rxrpc net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
sched netdev: network device operations infrastructure 2008-11-19 21:32:24 -08:00
sctp net: sctp should update its inuse counter 2008-11-17 02:41:00 -08:00
sunrpc sunrpc: Fix build warning due to typo in %pI4 format changes. 2008-11-02 23:57:06 -08:00
tipc tipc: trivial endian annotation in debug statement 2008-11-07 23:37:50 -08:00
unix net: af_unix should use KERN_INFO instead of KERN_DEBUG 2008-11-19 15:48:09 -08:00
wanrouter wanmain.c doesn't need syncppp.h 2008-07-23 23:00:36 +02:00
wireless net: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-10 13:55:14 -08:00
x25 net: '&' redux 2008-11-03 18:21:05 -08:00
xfrm net: Remove unused parameter of xfrm_gen_index() 2008-11-12 23:28:15 -08:00
compat.c net: put_cmsg_compat + SO_TIMESTAMP[NS]: use same name for value as caller 2008-11-12 01:54:56 -08:00
Kconfig netdev: network device operations infrastructure 2008-11-19 21:32:24 -08:00
Makefile net: Distributed Switch Architecture protocol support 2008-10-08 17:15:19 -07:00
nonet.c
socket.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-06 22:43:03 -08:00
sysctl_net.c missing bits of net-namespace / sysctl 2008-07-27 09:45:34 -07:00
TUNABLE