summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-12-10 17:18:46 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-12-17 23:32:08 +0100
commita504b703bb1da526a01593da0e4be2af9d9f5fa8 (patch)
treeaac0ccf650669f9822080b7884020ff976afbcfe /tools/perf/scripts/python/export-to-postgresql.py
parentb635cbf68ff35817d5a1634b0ade41f96ef70daf (diff)
netfilter: nat: limit port clash resolution attempts
In case almost or all available ports are taken, clash resolution can take a very long time, resulting in soft lockup. This can happen when many to-be-natted hosts connect to same destination:port (e.g. a proxy) and all connections pass the same SNAT. Pick a random offset in the acceptable range, then try ever smaller number of adjacent port numbers, until either the limit is reached or a useable port was found. This results in at most 248 attempts (128 + 64 + 32 + 16 + 8, i.e. 4 restarts with new search offset) instead of 64000+, Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions