mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
diagnostics: listen on both TCP/IP and vsock ports
The TCP/IP port will be used by Windows, while Mac can use the vsock one. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
15b772d496
commit
184fa38903
@ -10,6 +10,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
"github.com/djs55/vsock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func run(timeout time.Duration, w *tar.Writer, command string, args ...string) {
|
func run(timeout time.Duration, w *tar.Writer, command string, args ...string) {
|
||||||
@ -108,6 +109,12 @@ func main() {
|
|||||||
} else {
|
} else {
|
||||||
listeners = append(listeners, ip)
|
listeners = append(listeners, ip)
|
||||||
}
|
}
|
||||||
|
vsock, err := vsock.Listen(uint(62374))
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Failed to bind to vsock port 62374: %#v", err)
|
||||||
|
} else {
|
||||||
|
listeners = append(listeners, vsock)
|
||||||
|
}
|
||||||
|
|
||||||
for _, l := range listeners {
|
for _, l := range listeners {
|
||||||
go func(l net.Listener) {
|
go func(l net.Listener) {
|
||||||
|
Loading…
Reference in New Issue
Block a user