James Carlson wrote:
Positive. Look at tcp_clean_death().
:(((
I wonder why I didn't notice it in my environment. Maybe client is not
receiving RST in my tests? It is possible because it wait's for data and
firewall will send RST only if it get packet from client.
I have to agree - TIOCOUTQ does not solve retransmition problem of
connection reestablishing and reliable retransmistion of unsent data.
:.(((
So, how does TIOCOUTQ really work in the face of broken equipment?
Really? Are you sure that TIOCOUTQ doesn't also return a complete
falsehood due to the firewall misbehavior? How can you know?
First - it is not misbehavior but firewall feature ;)
take a look at
http://www.cisco.com/en/US/products/hw/switches/ps708/products_module_configuration_guide_chapter09186a0080577c66.html
On this particular module you can set half closed connection timeout -
so it is up to some admins on the route to make shutdown-read-close
aproach unusable on crowded connections.
Second - I know because I've made tests, and I also have less hang
reports from clients.
Application level mechanisms, first. If I decided I didn't care that
much about reliability, then I wouldn't do any of the above. Just
write and close.
Application level can't be chosen because it was HTTP and I can't force
Microsoft to use my own protocol in IE 10. ;)
In this case nonblocking close would be the best (it could return -1 and
errno=EAGAIN ) but would it be more portable ?
I don't understand. That's effectively what shutdown _does_. It
doesn't block, and it behaves as if you'd closed the connection, and
it's portable.
but it doesn't work with short half-closed connections timeouts on some
firewalls
On the other hand there is BrandZ community - if they wan't to run all
userspace linux apps they'll have to provide such feature.
They'll not get much help from the kernel, I'd imagine. It looks like
a pretty serious overhaul to get it _right_.
Returning 0 would probably be the best answer there.
I have such code in ifdefs :).
_______________________________________________
networking-discuss mailing list
[email protected]