lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #6865] SO_REUSEADDR for TCP


From: Jeff Barber
Subject: [lwip-devel] [patch #6865] SO_REUSEADDR for TCP
Date: Sat, 13 Feb 2010 22:10:50 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6

Follow-up Comment #13, patch #6865 (project lwip):

I agree about SO_REUSEPORT.  It seems pretty much the same thing with
differences too tiny to bother with.

Not sure I followed your point about "binding listen pcbs to ports used by
non-listen pcbs".  I didn't mean to say that and I don't think linux allows
it.  Both the existing endpoints and new ones with the same port number must
*not* be in LISTEN state and must have the REUSEADDR flag set in order for
bind to succeed.

The current patch certainly doesn't handle all the cases that linux does.  It
really handles only the most common case: a single remote FTP client is
attached to a local server and is making consecutive one-at-a-time data
transfers where each uses the same lwip-side port number (hence the previous
just-closed connection is often still in TIME_WAIT).  It doesn't handle the
case of multiple remote FTP clients.  But it was plenty for my purposes since
I only expect a single remote ftp client to be updating my local storage at a
time anyway, but it *is* less general.

If you implement it as flexibly as linux, there *are* some possibilities to
get multiple 5-tuples with the same endpoint addresses.  However, the remote
system would need to collude in that as well which means practically speaking
it won't happen.  Even when the local FTP server, for example, is re-using the
same local port over and over, the remote system is typically creating a
unique port number for each endpoint.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6865>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]