netfilter: nfnetlink_queue: cleanup copy_range usage
authorFlorian Westphal <fw@strlen.de>
Tue, 4 Jun 2013 22:22:15 +0000 (22:22 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 5 Jun 2013 10:40:28 +0000 (12:40 +0200)
commit9cefbbc9c8f9abe0bc514dcfca46e8051ee84050
treea2b97a4b79be5ca8a3723f8eb7082732689cee68
parent4e7dba99c9e606e304f104ce4071d8b5ba93957e
netfilter: nfnetlink_queue: cleanup copy_range usage

For every packet queued, we check if configured copy_range
is 0, and treat that as 'copy entire packet'.

We can move this check to the queue configuration, and can
set copy_range appropriately.

Also, convert repetitive '0xffff - NLA_HDRLEN' to a macro.

[ queue initialization still used 0xffff, although its harmless
  since the initial setting is overwritten on queue config ]

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_queue_core.c