summaryrefslogtreecommitdiff
path: root/net/vmw_vsock/af_vsock.c
diff options
context:
space:
mode:
authorAndy King <acking@vmware.com>2013-02-18 06:04:13 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-18 15:02:51 -0500
commit6cf1c5fc26c6507bcb0edced6fcda876a79b5a6d (patch)
tree1c8fb5732344addc6336e8ba8c7c4154a6dac9ac /net/vmw_vsock/af_vsock.c
parent5b8ca5344f82e594e21c9fbbdf3b13507ecdb5a2 (diff)
downloadlinux-rt-6cf1c5fc26c6507bcb0edced6fcda876a79b5a6d.tar.gz
VSOCK: Don't reject PF_VSOCK protocol
Allow our own family as the protocol value for socket creation. Reported-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Andy King <acking@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock/af_vsock.c')
-rw-r--r--net/vmw_vsock/af_vsock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index c1b9e55e338e..ca511c4f388a 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1860,7 +1860,7 @@ static int vsock_create(struct net *net, struct socket *sock,
if (!sock)
return -EINVAL;
- if (protocol)
+ if (protocol && protocol != PF_VSOCK)
return -EPROTONOSUPPORT;
switch (sock->type) {