Problem
TCP connections on my OpenServer 6.0.0 system are hanging if the amount of data being transferred is large. As root, running
# netstat -anI can see that the problem connections are in the TIME_WAIT state.
I have configured ipf(ADMN) to filter incoming and outgoing IP packets on this server.
Cause
If you are using the "keep state" rule in your filtering rule set, then this may be the cause.
Solution
To workaround this issue, edit your filtering rule set and add:
flags Sto all tcp rules that use the "keep state" rule syntax.
For example, if a rule is currently:
pass out quick on net0 proto tcp keep state
it should be changed to:pass out quick on net0 proto tcp flags S keep state
Please Note that if any rule you are using mentions multiple protocols then the tcp protocol rule will need to broken out from the others. For example, if your rule is currently:
pass out quick on net0 proto tcp/udp keep state
it will need to be changed to:
pass out quick on net0 proto tcp flags S keep state pass out quick on net0 proto udp keep state
Once you have made the changes you can flush the existing filtering rules and load the new rules file using:
# ipf -Fa -f /etc/ipf.rulesPlease Note that the command above assumes your rules file is called /etc/ipf.rules.
SCO would like to acknowledge Stuart Morrison of Veterinary Solutions Ltd for his assistance in providing the workaround to this issue.
See also
http://osr600doc.xinuos.com/en/NET_tcp/ipf-howto.htmlhttp://osr600doc.xinuos.com/en/man/html.ADMN/ipf.ADMN.html