From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH lnf-queue] src: PF_BIND/UNBIND is ignored in 3.8 and later
Date: Thu, 24 Apr 2014 12:01:05 +0200 [thread overview]
Message-ID: <20140424100105.GA8151@localhost> (raw)
In-Reply-To: <1398330071-3463-1-git-send-email-fw@strlen.de>
On Thu, Apr 24, 2014 at 11:01:11AM +0200, Florian Westphal wrote:
> There is confusion on what this command actually does and why
> examples commonly PF_UNBIND at startup.
>
> Since these are obsolete document that its not needed at all
> from 3.8 onwards and remove the unbind from the example program.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> I'll push it later today if noone objets.
>
> diff --git a/examples/nf-queue.c b/examples/nf-queue.c
> index 1f465ad..4e0b227 100644
> --- a/examples/nf-queue.c
> +++ b/examples/nf-queue.c
> @@ -136,17 +136,9 @@ int main(int argc, char *argv[])
> exit(EXIT_FAILURE);
> }
>
> - nlh = nfq_hdr_put(buf, NFQNL_MSG_CONFIG, 0);
> - nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_PF_UNBIND);
> -
> - if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
> - perror("mnl_socket_send");
> - exit(EXIT_FAILURE);
> - }
> -
> + /* PF_BIND is not needed with kernels 3.8 and later */
My only concern is that people using old kernels won't manage to run
this example, I think there are quite a lot of people running < 3.8,
so we may hit confusion from the other side.
I like the remaining part of the patch, but this part, I would just
leave it with a big fat comment like from here to there you can remove
this code since the NFQNL_CFG_CMD_PF_UNBIND is noop in >= 3.8.
next prev parent reply other threads:[~2014-04-24 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 9:01 [PATCH lnf-queue] src: PF_BIND/UNBIND is ignored in 3.8 and later Florian Westphal
2014-04-24 10:01 ` Pablo Neira Ayuso [this message]
2014-04-24 10:09 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140424100105.GA8151@localhost \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.