Subject: Re: SCTP control socket question

From: "Denis V. Lunev" <[email-masked]>
Date: Thu, 27 Mar 2008 16:09:58 +0300

On Thu, 2008-03-27 at 08:48 -0400, Vlad Yasevich wrote:
> Denis V. Lunev wrote:
> > Hello, Vlad!
> > 
> > I have read SCTP sources and found that SCTP control socket
> > (sctp_ctl_socket) remains hashed unlike similar staff in UDP/TCP etc.
> > 
> > Am I wrong, that it should not be hashed or not?
> 
> Why do you believe that the socket is hashed?  That socket is only
> allocated and referenced.  It's should not be in any hash tables
> since we hold a global reference on it.

sctp_ctl_sock_init
  __sock_create
    inet(6)_create
        sk->sk_prot->hash(sk);

For this purpose sk->sk_prot->unhash is explicitly called for ICMP/TCP
etc cases.

Regards,
	Den