Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VZFileHandleNetworkDeviceAttachment should support AF_UNIX type DGRAM sockets #98

Closed
balajiv113 opened this issue Oct 31, 2022 · 1 comment · Fixed by #100
Closed

VZFileHandleNetworkDeviceAttachment should support AF_UNIX type DGRAM sockets #98

balajiv113 opened this issue Oct 31, 2022 · 1 comment · Fixed by #100
Labels
bug Something isn't working

Comments

@balajiv113
Copy link
Contributor

Describe the bug
The fileHandle must be a datagram socket error thrown for AF_UNIX type Datagram socket.

Virtualization framework provides support for Datagram socket of type AF_UNIX as well

To Reproduce
Steps to reproduce the behavior:

vz.NewFileHandleNetworkDeviceAttachment(f) // f has a file descriptor which is a datagram socket of type AF_UNIX

Refer https://github.com/balajiv113/lima/blob/driver/pkg/vz/vz_driver.go#L132 for creating AF_UNIX based DATAGRAM socket

Expected behavior
No error thrown.

Environment that you use to compile (please complete the following information):

  • Xcode version: [Xcode 14.1, Build version 14B47b]
  • macOS Version: [ProductName: macOS ProductVersion: 13.0 BuildVersion: 22A380 ]
  • mac architecture: [x86_64 ]
  • Go Version: [go version go1.19.2 darwin/amd64 ]

Additional context
This issue occurs due to the recently added validation of isInet check here

vz/network.go

Line 176 in c4f6e4b

case *syscall.SockaddrInet4, *syscall.SockaddrInet6:

@balajiv113 balajiv113 added the bug Something isn't working label Oct 31, 2022
@Code-Hex
Copy link
Owner

@balajiv113 Thanks for creating this issue!
Nice catch 👍

Code-Hex added a commit that referenced this issue Oct 31, 2022
Code-Hex added a commit that referenced this issue Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants