google / google/gvisor

Newly created sandbox in host networking mode has lo interface DOWN

Open
#11,766 4 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

In our experiment we found that in a newly created gVisor Sandbox, if the network stack is set to none, then there is a lo interface and it is enabled with loopback address of 127.0.0.1. But if the network stack is set to host, the lo interface still exists, but is disabled (i.e. state DOWN). These can all be explained by the code here. https://github.com/google/gvisor/blob/master/runsc/sandbox/network.go#L71

The problem is that in none mode, there is no networking outside of the sandbox. We want to both enable loopback, and also network externally. Is there a way to have lo enabled in host mode?

I have tried to duplicates L60-63 to L72, but it does not work.

### Is this feature related to a specific bug?

_No response_

### Do you have a specific solution in mind?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.