]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nat: move repetitive nat port reserve loop to a helper
authorFlorian Westphal <fw@strlen.de>
Tue, 6 Sep 2022 15:20:35 +0000 (17:20 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 7 Sep 2022 14:46:04 +0000 (16:46 +0200)
commit4299cf54eaabec7b6383990b1cf54ccd481c756d
tree59d7fc3e6dbecbee86cb99add3454a1f999f5047
parentb978d0eb08ee7bbdb775f2a68df0e59d6324172a
netfilter: nat: move repetitive nat port reserve loop to a helper

Almost all nat helpers reserve an expecation port the same way:
Try the port inidcated by the peer, then move to next port if that
port is already in use.

We can squash this into a helper.

Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
include/net/netfilter/nf_nat_helper.h
net/ipv4/netfilter/nf_nat_h323.c
net/netfilter/nf_nat_amanda.c
net/netfilter/nf_nat_ftp.c
net/netfilter/nf_nat_helper.c
net/netfilter/nf_nat_irc.c
net/netfilter/nf_nat_sip.c