]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r341999:
authorKristof Provost <kp@FreeBSD.org>
Wed, 26 Dec 2018 12:55:35 +0000 (12:55 +0000)
committerKristof Provost <kp@FreeBSD.org>
Wed, 26 Dec 2018 12:55:35 +0000 (12:55 +0000)
commite46daeab17c535f41fcadcf7b90cb4edef985f8a
tree68f58d297f8195a22864fd30e5a10c53890bbc7f
parent2ea0396c3372758ac399b2cd9d5008a570bd4764
MFC r341999:

pf tests: NAT exhaustion test

It's been reported that pf doesn't handle running out of available ports
for NAT correctly. It freezes until a state expires and it can find a
free port.
Test for this, by setting up a situation where only two ports are
available for NAT and then attempting to create three connections.

If successful the third connection will fail immediately. In an
incorrect case the connection attempt will freeze, also freezing all
interaction with pf through pfctl and trigger timeout.

PR: 233867
tests/sys/netpfil/pf/Makefile
tests/sys/netpfil/pf/nat.sh [new file with mode: 0755]