Skip to content
Commit adda60cc authored by Florian Westphal's avatar Florian Westphal
Browse files

netfilter: nat: avoid long-running port range loop



Looping a large port range takes too long. Instead select a random
offset within [ntohs(exp->saved_proto.tcp.port), 65535] and try 128
ports.

This is a rehash of an erlier patch to do the same, but generalized
to handle other helpers as well.

Link: https://patchwork.ozlabs.org/project/netfilter-devel/patch/20210920204439.13179-2-Cole.Dishington@alliedtelesis.co.nz/
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent c92c2717
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment