exit(EXIT_FAILURE);
}
+ /* PF_(UN)BIND is not needed with kernels 3.8 and later */
nlh = nfq_hdr_put(buf, NFQNL_MSG_CONFIG, 0);
nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_PF_UNBIND);
* \param h Netfilter queue connection handle obtained via call to nfq_open()
* \param pf protocol family to bind to nfqueue handler obtained from nfq_open()
*
- * Binds the given queue connection handle to process packets belonging to
+ * Binds the given queue connection handle to process packets belonging to
* the given protocol family (ie. PF_INET, PF_INET6, etc).
+ * This call is obsolete, Linux kernels from 3.8 onwards ignore it.
*
* \return integer inferior to 0 in case of failure
*/
*
* Unbinds the given queue connection handle from processing packets belonging
* to the given protocol family.
+ *
+ * This call is obsolete, Linux kernels from 3.8 onwards ignore it.
*/
int nfq_unbind_pf(struct nfq_handle *h, u_int16_t pf)
{
* subsystem is working.
* - NFQNL_CFG_CMD_BIND: Binds the program to a specific queue.
* - NFQNL_CFG_CMD_UNBIND: Unbinds the program to a specifiq queue.
+ *
+ * Obsolete commands:
* - NFQNL_CFG_CMD_PF_BIND: Binds to process packets belonging to the given
* protocol family (ie. PF_INET, PF_INET6, etc).
* - NFQNL_CFG_CMD_PF_UNBIND: Unbinds from processing packets belonging to the
- * given protocol family.
+ * given protocol family. Both commands are ignored by Linux kernel 3.8 and
+ * later versions.
*/
void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
{