Skip to content

Commit

Permalink
VSOCK: Don't reject PF_VSOCK protocol
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy King authored and David S. Miller committed Feb 18, 2013
1 parent 5b8ca53 commit 6cf1c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/vmw_vsock/af_vsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6cf1c5f

Please sign in to comment.