All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next 0/4] Refine the nat helper codes
@ 2017-03-17  6:45 fgao
  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
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: fgao @ 2017-03-17  6:45 UTC (permalink / raw)
  To: pablo, netfilter-devel, gfree.wind; +Cc: Gao Feng

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-27 12:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  6:45 [PATCH nf-next 0/4] Refine the nat helper codes fgao
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

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.