Skip to contentSkip to conversation

libmnl [PATCH 7/8] examples: fix display condition

PATCH Ken-ichirou MATSUZAWA 1 participant 1 message Dec 7, 2013 netfilter

lore
Share & tools
lore
#0 lore raw
---
 examples/netfilter/nf-queue.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
examples/netfilter/nf-queue.c +3 -2
index 6b7c30e..72779f0 100644
@@ -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;
 }
Signature · 1 line
1.8.4.rc3