vsudd: Bind to VSOCK_CID_ANY rather than "3"

This is equivalent to binding to 0.0.0.0 rather than a specific IP address.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell 2016-04-07 17:38:56 +01:00
parent d82a23a399
commit 777ddec6b8

View File

@ -73,7 +73,7 @@ func main() {
sa := C.struct_sockaddr_vm{}
sa.svm_family = AF_VSOCK
sa.svm_port = C.uint(port)
sa.svm_cid = 3
sa.svm_cid = VSOCK_CID_ANY
if ret := C.bind_sockaddr_vm(C.int(accept_fd), &sa); ret != 0 {
log.Fatal(fmt.Sprintf("failed bind vsock connection to %08x.%08x, returned %d", sa.svm_cid, sa.svm_port, ret))