Subject: Re: [RFT] Re: Fw: Nasty Oops in 2.6.0-test6 bind/SO_REUSEADDR

From: "David S. Miller" <[email-masked]>
Date: Sat, 11 Oct 2003 12:56:56 -0700

On Fri, 10 Oct 2003 12:40:52 -0300
Arnaldo Carvalho de Melo <[email-masked]> wrote:

> ipv6_rcv_saddr_equal, look at this:
> 
>         if (sk2->sk_family == AF_INET6 &&
>             !ipv6_addr_cmp(&np->rcv_saddr,
>                            (sk2->sk_state != TCP_TIME_WAIT ?
>                             &inet6_sk(sk2)->rcv_saddr :
>                             &tcptw_sk(sk)->tw_v6_rcv_saddr)))
>                                       ^^
>                                       ^^
> shouldn't the tcp_tw_sk(sk) be tcp_tw_sk(sk2)?

Yes.

> And in this function we have the guard against it being a tcp_tw_bucket, but
> not in all places...

It does guard in this spot, that's why it is checking the
sk_state value.