android_kernel_xiaomi_sm7250/net/core
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
..
datagram.c net: sk_free_datagram() should use sk_mem_reclaim_partial() 2008-11-05 01:38:06 -08:00
dev_mcast.c net: Rationalise email address: Network Specific Parts 2008-10-13 19:01:08 -07:00
dev.c netdev: introduce dev_get_stats() 2008-11-19 21:40:23 -08:00
dst.c net: speedup dst_release() 2008-11-14 00:53:54 -08:00
ethtool.c netdev: Add support for rx flow hash configuration, using ethtool. 2008-07-02 03:47:41 -07:00
fib_rules.c net: fib_rules ordering fixes. 2008-11-07 22:52:34 -08:00
filter.c filter: add SKF_AD_NLATTR_NEST to look for nested attributes 2008-11-20 00:49:27 -08:00
flow.c net: mark flow_cache_cpu_prepare() as __init 2008-11-06 23:06:44 -08:00
gen_estimator.c Revert "pkt_sched: Protect gen estimators under est_lock." 2008-08-18 22:32:10 -07:00
gen_stats.c [NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API 2008-01-28 15:11:10 -08:00
iovec.c net: Use standard structures for generic socket address structures. 2008-07-19 22:35:47 -07:00
kmap_skb.h [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
link_watch.c net: Clean up explicit ->tx_queue references in link watch. 2008-07-08 23:01:06 -07:00
Makefile net: Add SKB DMA mapping helper functions. 2008-09-11 04:51:14 -07:00
neighbour.c net: Cleanup of neighbour code 2008-11-12 00:54:54 -08:00
net_namespace.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-31 00:17:34 -07:00
net-sysfs.c netdev: introduce dev_get_stats() 2008-11-19 21:40:23 -08:00
net-sysfs.h netns: Fix device renaming for sysfs 2008-05-02 17:00:58 -07:00
netevent.c [NET]: net/core/netevent.c should #include <net/netevent.h> 2007-07-05 17:40:27 -07:00
netpoll.c netdev: network device operations infrastructure 2008-11-19 21:32:24 -08:00
pktgen.c pktgen: add full reset functionality 2008-11-10 16:48:03 -08:00
request_sock.c net: convert BUG_TRAP to generic WARN_ON 2008-07-25 21:43:18 -07:00
rtnetlink.c netdev: introduce dev_get_stats() 2008-11-19 21:40:23 -08:00
scm.c scm: fix scm_fp_list->list initialization made in wrong place 2008-11-14 14:51:45 -08:00
skb_dma_map.c net: Fix off-by-one in skb_dma_map 2008-10-12 21:07:34 -07:00
skbuff.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
sock.c net: make /proc/net/protocols namespace aware 2008-11-19 15:14:01 -08:00
stream.c net: Rationalise email address: Network Specific Parts 2008-10-13 19:01:08 -07:00
sysctl_net_core.c net: '&' redux 2008-11-03 18:21:05 -08:00
user_dma.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-26 20:17:56 -07:00
utils.c printk ratelimiting rewrite 2008-07-25 10:53:29 -07:00