mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-29 21:42:39 +00:00
Merge pull request #155 from djs55/remove-individual-vsock-proxy
proxy: remove the dynamic vsock port allocation
This commit is contained in:
commit
4ce0d53f85
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/rneugeba/virtsock/go/vsock"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
@ -12,12 +11,8 @@ import (
|
||||
)
|
||||
|
||||
func onePort() {
|
||||
host, port, container := parseHostContainerAddrs()
|
||||
host, _, container := parseHostContainerAddrs()
|
||||
|
||||
vsockP, err := libproxy.NewVsockProxy(&vsock.VsockAddr{Port: uint(port)}, container)
|
||||
if err != nil {
|
||||
sendError(err)
|
||||
}
|
||||
ipP, err := libproxy.NewIPProxy(host, container)
|
||||
if err != nil {
|
||||
sendError(err)
|
||||
@ -31,8 +26,7 @@ func onePort() {
|
||||
go handleStopSignals(ipP)
|
||||
// TODO: avoid this line if we are running in a TTY
|
||||
sendOK()
|
||||
go ipP.Run()
|
||||
vsockP.Run()
|
||||
ipP.Run()
|
||||
ctl.Close() // ensure ctl remains alive and un-GCed until here
|
||||
os.Exit(0)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user