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

virtionet: Fix 'path too long' issues with virtio-net unixgram Support #195

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Oct 29, 2024

  1. gha: Use macos 15 runners instead of macos 12

    macos 12 runners are going away:
    actions/runner-images#10721
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    9ffdfe5 View commit details
    Browse the repository at this point in the history
  2. net: Create client endpoint in the same dir as the remote's

    With unixgram sockets, we need to specify a client endpoint, which is a
    path on the filesystem with a maximum length of 104 bytes on macOS.
    When using -device virtio-net,unixSocketPath=/tmp/vnet.sock, we
    need to create a client endpoint before connecting to /tmp/vnet.sock.
    It's currently put into `/Users/user/Library/Application Support`, which
    is already fairly long. Depending on the username, the 104 bytes are
    easily exceeded, this has been causing problems to podman machine.
    
    This commit will create the client endpoint in the same directory as the
    server endpoint, which gives more control to the user of vfkit wrt where
    this socket is going.
    
    This fixes crc-org#194
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    9cf2031 View commit details
    Browse the repository at this point in the history
  3. net: Improve error when unix socket path length is over 104

    Path used for unix socket client/server endpoints have to be less than
    104. When this is not the case, `bind: invalid argument` is returned.
    This commit checks the path length before calling `DialUnix` in order to
    provide an easier to understand error message.
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    9fd535d View commit details
    Browse the repository at this point in the history
  4. net: Shorten the path used by the client endpoint

    For communication over unixgram, both the server and the client
    need an endpoint. They are filesystem paths which must be smaller than
    104 bytes. This commit attempts to make them shorter while keeping them
    unique and non-guessable.
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    2c0c311 View commit details
    Browse the repository at this point in the history