From: fgao@ikuai8.com
To: pablo@netfilter.org, netfilter-devel@vger.kernel.org,
gfree.wind@gmail.com
Cc: Gao Feng <fgao@ikuai8.com>
Subject: [PATCH nf-next 0/4] Refine the nat helper codes
Date: Fri, 17 Mar 2017 14:45:48 +0800 [thread overview]
Message-ID: <cover.1489726438.git.fgao@ikuai8.com> (raw)
From: Gao Feng <fgao@ikuai8.com>
There are some netfilter functions which return the literal 1 and 0 as
the bool value. We should use bool instead of them.
And even though some calleris treat the return value as Neftiler action.
For example, the caller would compare the return value with NF_ACCEPT.
Luckily the value of NF_ACCEPT is 1, so there is no any real issue.
Gao Feng (4):
netfilter: amanda: Correct the return value comparison of the func
nf_nat_mangle_udp_packet
netfilter: irc: Correct the return value comparison of the func
nf_nat_mangle_tcp_packet
netfilter: helper: Use the bool instead of int type
netfilter: sip: Use NF_DROP and NF_ACCEPT instead of 0 and 1
include/net/netfilter/nf_nat_helper.h | 36 +++++++++++++++----------------
net/netfilter/nf_nat_amanda.c | 11 +++++-----
net/netfilter/nf_nat_helper.c | 40 +++++++++++++++++------------------
net/netfilter/nf_nat_irc.c | 9 ++++----
net/netfilter/nf_nat_sip.c | 6 +++---
5 files changed, 50 insertions(+), 52 deletions(-)
--
1.9.1
next reply other threads:[~2017-03-17 6:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 6:45 fgao [this message]
2017-03-17 6:47 ` [PATCH nf-next 1/4] netfilter: amanda: Correct the return value comparison of the func nf_nat_mangle_udp_packet fgao
2017-03-27 12:12 ` Pablo Neira Ayuso
2017-03-27 12:48 ` Gao Feng
2017-03-17 6:47 ` [PATCH nf-next 2/4] netfilter: irc: Correct the return value comparison of the func nf_nat_mangle_tcp_packet fgao
2017-03-17 6:49 ` [PATCH nf-next 3/4] netfilter: helper: Use the bool instead of int type fgao
2017-03-17 6:49 ` [PATCH nf-next 4/4] netfilter: sip: Use NF_DROP and NF_ACCEPT instead of 0 and 1 fgao
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=cover.1489726438.git.fgao@ikuai8.com \
--to=fgao@ikuai8.com \
--cc=gfree.wind@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).