Generalize netfilter/queue to allow sending batched verdicts later. Signed-off-by: Holger Eitzenberger Index: libnl-nfqueue/lib/netfilter/queue_msg.c =================================================================== --- libnl-nfqueue.orig/lib/netfilter/queue_msg.c +++ libnl-nfqueue/lib/netfilter/queue_msg.c @@ -163,12 +163,14 @@ errout: /** @} */ -struct nl_msg *nfnl_queue_msg_build_verdict(const struct nfnl_queue_msg *msg) +static struct nl_msg * +__nfnl_queue_msg_build_verdict(const struct nfnl_queue_msg *msg, + uint8_t type) { struct nl_msg *nlmsg; struct nfqnl_msg_verdict_hdr verdict; - nlmsg = nfnlmsg_alloc_simple(NFNL_SUBSYS_QUEUE, NFQNL_MSG_VERDICT, 0, + nlmsg = nfnlmsg_alloc_simple(NFNL_SUBSYS_QUEUE, type, 0, nfnl_queue_msg_get_family(msg), nfnl_queue_msg_get_group(msg)); if (nlmsg == NULL) @@ -191,6 +193,12 @@ nla_put_failure: return NULL; } +struct nl_msg * +nfnl_queue_msg_build_verdict(const struct nfnl_queue_msg *msg) +{ + return __nfnl_queue_msg_build_verdict(msg, NFQNL_MSG_VERDICT); +} + /** * Send a message verdict/mark * @arg nlh netlink messsage header