Skip to content
Commit 05174c95 authored by Paolo Abeni's avatar Paolo Abeni Committed by Paul Moore
Browse files

selinux: do not report error on connect(AF_UNSPEC)



calling connect(AF_UNSPEC) on an already connected TCP socket is an
established way to disconnect() such socket. After commit 68741a8a
("selinux: Fix ltp test connect-syscall failure") it no longer works
and, in the above scenario connect() fails with EAFNOSUPPORT.

Fix the above explicitly early checking for AF_UNSPEC family, and
returning success in that case.

Reported-by: default avatarTom Deseyn <tdeseyn@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 68741a8a ("selinux: Fix ltp test connect-syscall failure")
Suggested-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 35a196be
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