Skip to content

netfilter: nat: avoid long-running loops

Florian Westphal netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: nat: move repetitive nat port reserve loop to a helperinclude/net/netfilter/nf_nat_helper.h net/ipv4/netfilter/nf_nat_h323.c net/netfilter/nf_nat_amanda.c +4 more+30 -1110 replies
2/2netfilter: nat: avoid long-running port range loopnet/netfilter/nf_nat_helper.c+14 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf-next 0/2] netfilter: nat: avoid long-running loops

If a majority of ports are in use, trying every available port may take significant amounts of time.

Add a upper limit and cancel once we've exhausted all available options.

First patch collapses the repetitive reserve-port loop into a helper, second patch changes the helper to only make up to 128 attempts.

Florian Westphal (2):
netfilter: nat: move repetitive nat port reserve loop to a helper
netfilter: nat: avoid long-running port range loop

 include/net/netfilter/nf_nat_helper.h |  1 +
 net/ipv4/netfilter/nf_nat_h323.c      | 60 ++-------------------------
 net/netfilter/nf_nat_amanda.c         | 14 +------
 net/netfilter/nf_nat_ftp.c            | 17 +-------
 net/netfilter/nf_nat_helper.c         | 31 ++++++++++++++
 net/netfilter/nf_nat_irc.c            | 16 +------
 net/netfilter/nf_nat_sip.c            | 14 +------
 7 files changed, 42 insertions(+), 111 deletions(-)
Signature · 1 line
2.35.1