mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
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:
parent
d82a23a399
commit
777ddec6b8
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user