mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-07 11:28:05 +00:00
proxy: tell the /port server the real external IP address
Before this we accidentally told it the vsock address, which obviously isn't much good. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"os"
|
||||
"libproxy"
|
||||
"strings"
|
||||
"vsock"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -41,7 +40,7 @@ func exposePort(host net.Addr, port int) error {
|
||||
log.Printf("Failed to open /port/%s/ctl: %#v\n", name, err)
|
||||
return err
|
||||
}
|
||||
_, err = ctl.WriteString(fmt.Sprintf("%s:%d:%d", name, vsock.VSOCK_CID_SELF, vSockPortOffset + port))
|
||||
_, err = ctl.WriteString(fmt.Sprintf("%s:%08x", name, port))
|
||||
if err != nil {
|
||||
log.Printf("Failed to open /port/%s/ctl: %#v\n", name, err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user