Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions guest/microvm-supervisor/runtime_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ func configureNetwork(config bootConfig) error {
func networkSetupCommands(config bootConfig) [][]string {
return [][]string{
{"link", "set", "dev", "lo", "up"},
{"address", "replace", "127.0.0.1/8", "dev", "lo"},
{"link", "set", "dev", config.Interface, "up"},
{"address", "replace", config.GuestIP.String() + fmt.Sprintf("/%d", config.GuestPrefix), "dev", config.Interface},
{"route", "replace", "default", "via", config.Gateway.String(), "dev", config.Interface},
Expand Down
1 change: 1 addition & 0 deletions guest/microvm-supervisor/runtime_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func TestNetworkSetupCommandsBringUpLoopbackFirst(t *testing.T) {
got := networkSetupCommands(config)
want := [][]string{
{"link", "set", "dev", "lo", "up"},
{"address", "replace", "127.0.0.1/8", "dev", "lo"},
{"link", "set", "dev", "eth0", "up"},
{"address", "replace", "100.64.0.2/30", "dev", "eth0"},
{"route", "replace", "default", "via", "100.64.0.1", "dev", "eth0"},
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/cloud-hypervisor-live-smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ fi

run_case blocked-domain 0 \
'! wget -qO- https://github.com'
run_case loopback-tcp 0 \
'out=/tmp/loopback-tcp; nc -l -p 3002 >"$out" & listener=$!; trap "kill $listener 2>/dev/null || true" EXIT; sleep 1; printf loopback-ok | nc -w 3 127.0.0.1 3002; wait "$listener"; trap - EXIT; grep -q loopback-ok "$out"'
Comment thread
Copilot marked this conversation as resolved.
Outdated
run_case direct-egress 0 \
'unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy; ! wget -qO- https://example.com'
run_case arbitrary-tcp 0 \
Expand Down
Loading