summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen-ichirou MATSUZAWA <chamaken@gmail.com>2013-12-07 20:30:47 +0900
committerFlorian Westphal <fw@strlen.de>2013-12-07 12:53:46 +0100
commit7d64d7299abd2f23faffec27829986020bceadbb (patch)
tree5e5ed0de9d2b0ad3495bcdb261cc93a4a6e0d7e3
parent60dfea927d1c6b94239243b828ea9656a48601e9 (diff)
examples: fix display condition
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r--examples/netfilter/nf-queue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/netfilter/nf-queue.c b/examples/netfilter/nf-queue.c
index 6b7c30e..72779f0 100644
--- a/examples/netfilter/nf-queue.c
+++ b/examples/netfilter/nf-queue.c
@@ -67,9 +67,10 @@ static int queue_cb(const struct nlmsghdr *nlh, void *data)
if (tb[NFQA_PACKET_HDR]) {
ph = mnl_attr_get_payload(tb[NFQA_PACKET_HDR]);
id = ntohl(ph->packet_id);
+
+ printf("packet received (id=%u hw=0x%04x hook=%u)\n",
+ id, ntohs(ph->hw_protocol), ph->hook);
}
- printf("packet received (id=%u hw=0x%04x hook=%u)\n",
- id, ntohs(ph->hw_protocol), ph->hook);
return MNL_CB_OK + id;
}