netfilter: nft_queue: check the validation of queues_total and queuenum
authorLiping Zhang <liping.zhang@spreadtrum.com>
Tue, 6 Sep 2016 14:33:37 +0000 (22:33 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 9 Sep 2016 13:54:48 +0000 (15:54 +0200)
commitfe01111d23810c0cf6830ce5af1c14c6d3df6dc5
treedc44e6b3a6ad4f87b2b198914718ae0815feac4a
parent1bcabc81ee94c0a65989128258f8c1d3e1c1b0ea
netfilter: nft_queue: check the validation of queues_total and queuenum

Although the validation of queues_total and queuenum is checked in nft
utility, but user can add nft rules via nfnetlink, so it is necessary
to check the validation at the nft_queue expr init routine too.

Tested by run ./nft-test.py any/queue.t:
  any/queue.t: 6 unit tests, 0 error, 0 warning

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_queue.c