moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 188 forks source link

vpnkit-tap-vsockd, vpnkit-9pmount-vsock: try AF_VSOCK first, fall back to AF_HVSOCK #411

Closed djs55 closed 6 years ago

djs55 commented 6 years ago

The AF_HVSOCK patches were never merged in upstream Linux, instead Hyper-V support was added to AF_VSOCK instead. One consequence is the AF_VSOCK "port" is mapped into a special space of Hyper-V service GUIDs. This patch modifies vpnkit-tap-vsockd and vpnkit-9pmount-vsock to first try AF_VSOCK and then fall back to AF_HVSOCK.

This patch changes the command-lines from

      --serviceid <guid>

to

      --vsock <port>
djs55 commented 6 years ago

Only the travis build is relevant, since this is Linux rather than Mac (CircleCI) or Windows (appveyor)