Skip to content

Commit 6cf1c5f

Browse files
Andy Kingdavem330
authored andcommitted
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>
1 parent 5b8ca53 commit 6cf1c5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/vmw_vsock/af_vsock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ static int vsock_create(struct net *net, struct socket *sock,
18601860
if (!sock)
18611861
return -EINVAL;
18621862

1863-
if (protocol)
1863+
if (protocol && protocol != PF_VSOCK)
18641864
return -EPROTONOSUPPORT;
18651865

18661866
switch (sock->type) {

0 commit comments

Comments
 (0)