From 9cb80d1856156777cdb1bb0bf711c896e6e162e0 Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Mon, 28 Oct 2024 14:24:52 +0530 Subject: [PATCH] gvproxy: Disable port-forwarding on WSL This commit disables ssh port forwarding on WSL by passing -1 to the -ssh-port flag of gvproxy. Port forwarding is not required on WSL and disabling it prevents port conflict with CRC. Fixes: https://github.com/containers/podman/issues/20327 Signed-off-by: Gunjan Vyas --- pkg/machine/wsl/usermodenet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/machine/wsl/usermodenet.go b/pkg/machine/wsl/usermodenet.go index 0f09874e0f..866cdc4b4c 100644 --- a/pkg/machine/wsl/usermodenet.go +++ b/pkg/machine/wsl/usermodenet.go @@ -32,7 +32,7 @@ fi if [[ ! $ROUTE =~ default\ via ]]; then exit 3 fi -nohup $GVFORWARDER -iface podman-usermode -stop-if-exist ignore -url "stdio:$GVPROXY?listen-stdio=accept" > /var/log/vm.log 2> /var/log/vm.err < /dev/null & +nohup $GVFORWARDER -iface podman-usermode -stop-if-exist ignore -url "stdio:$GVPROXY?listen-stdio=accept&ssh-port=-1" > /var/log/vm.log 2> /var/log/vm.err < /dev/null & echo $! > $STATE/vm.pid sleep 1 ps -eo args | grep -q -m1 ^$GVFORWARDER || exit 42