Commit e5a80657 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

unix: don't restore name for unix stream established sockets

A stream socket may be bound, but is not listen yet.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 434c107d
...@@ -546,7 +546,7 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui) ...@@ -546,7 +546,7 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui)
{ {
struct sockaddr_un addr; struct sockaddr_un addr;
if ((ui->ue->type == SOCK_STREAM) && (ui->ue->state != TCP_LISTEN)) if ((ui->ue->type == SOCK_STREAM) && (ui->ue->state == TCP_ESTABLISHED))
/* /*
* FIXME this can be done, but for doing this properly we * FIXME this can be done, but for doing this properly we
* need to bind socket to its name, then rename one to * need to bind socket to its name, then rename one to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment