]> 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)
commit102bed659c3460d08f36bf493a9764d6a2478159
tree59d7fc3e6dbecbee86cb99add3454a1f999f5047
parent3f0038696779c71b62ff2cb627a838d6a319b893
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