[PATCH nf-next v2 0/2] NF NAT deduplication refactoring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These two patches perform refactoring in NF NAT modules to remove
duplicate code.  I've incorporated the changes that Pablo suggested.

Changes since v1.

  * The two redirect patches in v1 have been merged.
  * The new `struct nf_nat_range2` instance in nf_nat_redirect.c is
    memset to zero.
  * The two `union nf_inet_addr` instances in nf_nat_redirect.c are
    zero-initialized.
  * The `WARN_ON` call in nf_nat_redirect.c has been removed.

Jeremy Sowden (2):
  netfilter: nft_redir: use `struct nf_nat_range2` throughout and
    deduplicate eval call-backs
  netfilter: nft_masq: deduplicate eval call-backs

 include/net/netfilter/nf_nat_redirect.h |  3 +-
 net/netfilter/nf_nat_redirect.c         | 71 ++++++++++-----------
 net/netfilter/nft_masq.c                | 75 +++++++++-------------
 net/netfilter/nft_redir.c               | 84 +++++++++----------------
 net/netfilter/xt_REDIRECT.c             | 10 ++-
 5 files changed, 101 insertions(+), 142 deletions(-)

-- 
2.39.2




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux