examples: nf-queue: fix api usage
authorFlorian Westphal <fw@strlen.de>
Fri, 23 Nov 2012 11:10:10 +0000 (12:10 +0100)
committerr.kubiak <r.kubiak@samsung.com>
Mon, 16 Nov 2015 13:12:06 +0000 (14:12 +0100)
commita6b64b48d668bc3701633f37236a68b5d1cfca24
tree6ee7c52d0c78c2b10618e19b22a03a7ebfb0c0df
parent31dc1d9277aa406c778f5f739723749b4e7986fb
examples: nf-queue: fix api usage

1. struct nlattr *attr[NFQA_MAX+1] must be initialized.
   Otherwise, attr[FOO] might be non-null after parsing
   even if that attribute isn't present in the message.

2. mnl_attr_get_payload will never return NULL (if the
   attribute is NULL, it returns MNL_ATTR_HDRLEN.)

Signed-off-by: Florian Westphal <fw@strlen.de>
examples/nf-queue.c