Re: SO_REUSEADDR problem with 2.2.10-ac11?

kuznet@ms2.inr.ac.ru
Wed, 21 Jul 1999 18:38:10 +0400 (MSK DST)


Hello!

> I upgraded my system from 2.2.6 to 2.2.10-ac11 yesterday and noticed
> an interesting problem: multiple sockets can now bind to the same
> port on the same interface.

It was not deliberate, certainly. The patch is appended.

Alexey

--- ../orig/linux/net/ipv4/af_inet.c Mon Jun 21 18:31:10 1999
+++ linux/net/ipv4/af_inet.c Wed Jul 21 16:20:47 1999
@@ -303,6 +303,9 @@
}
sk->sport = htons(sk->num);
add_to_prot_sklist(sk);
+ } else {
+ if (sk->prev)
+ ((struct tcp_bind_bucket*)sk->prev)->fastreuse = 0;
}

dst_release(xchg(&sk->dst_cache, NULL));

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/