Re: bad karma with 2.0.1

Carsten Paeth (calle@calle.in-berlin.de)
Fri, 5 Jul 1996 16:24:38 +0200 (MET DST)


>
>
> There's appears to be some oddities with bind() in the new 2.0.1.
> basically, if an ftp server is running 2.0.1., then it appears that
> two people can't download at the same time.
>
> What _appears_ to happen is :
> session #1 bind's 1.2.24.7 port 20
> does a connect to remote ip.
>
> session #2 attempts to bind 1.2.24.7 port 20.
> fails with EADDRINUSE
>
> This worked prior to 2.0.1 (i.e. 2.0.0). As far as I can see, the old
> behaviour was legal. So why is the kernel now denying it??
>
> Michael.
>

It is this patch part:
---------------------------------------------------------------
diff -u --recursive --new-file v2.0.0/linux/net/ipv4/af_inet.c linux/net/ipv4/af
_inet.c
--- v2.0.0/linux/net/ipv4/af_inet.c Sun Jun 9 13:28:47 1996
+++ linux/net/ipv4/af_inet.c Tue Jul 2 19:08:43 1996
@@ -926,7 +926,7 @@
* Reuse ?
*/

- if (!sk2->reuse || sk2->state==TCP_LISTEN)
+ if (!sk2->dead)
{
sti();
return(-EADDRINUSE);

Yes, Linus, good idea not to accept large patches until 2.1 :-)

calle

-- 
calle@calle.in-berlin.de