vsock: fix bind() behaviour taking care of CID
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 14 Nov 2019 09:57:49 +0000 (10:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 02:12:18 +0000 (18:12 -0800)
commit36c5b48b91ac56762ef87e4af76350ed50f119b5
treeb647773d8a6e2ea023cfec82be93d32265a22b79
parent6a2c0962105ae8ceba182c4f616e0e41d7755591
vsock: fix bind() behaviour taking care of CID

When we are looking for a socket bound to a specific address,
we also have to take into account the CID.

This patch is useful with multi-transports support because it
allows the binding of the same port with different CID, and
it prevents a connection to a wrong socket bound to the same
port, but with different CID.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/af_vsock.c