Re: Out-of-order packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Bruce Guenter wrote:

> I have an application (a FTP server) that is behaving oddly on a 2.2.19
> kernel.  In response to a retrieval command, it does:
> 	socket
> 	connect or accept, depending on mode
> 	fcntl +O_NONBLOCK
> 	poll
> 	write
> 	...
> 	poll
> 	write
> 	fcntl -O_NONBLOCK
> 	close
> 	write(1, "226 Transfer Complete...")
> Standard output (fd 1) is also connected to a socket to the same client.
> What I'm seeing is that packet containing the "226" message is
> frequently sent to the client (according to tcpdump on the server)
> *before* the data from the final write on the new socket, even though
> that socket is closed (and the return from the close checked) before the
> "226" write.
> 
> I am currently unable to reproduce this effect with a 2.4 kernel.
> 
> Has anybody else seen this behavior?  Any ideas what might cause it?

Note that, unless you have used setsockopt(SO_LINGER) on the socket,
close() doesn't wait for the send buffer to be emptied.

-- 
Glynn Clements <glynn.clements@virgin.net>
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux