diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-11 03:32:21 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-11 03:36:20 +0900 |
| commit | 2494ede1067d5071d3cc7d355cdc2ae3fac66dc5 (patch) | |
| tree | 77cd8ef4785a83918f78389ce05011b0fc14bd97 /container/init.go | |
| parent | da3848b92f22259d97b1d3851e17d1a8c6ffeb3d (diff) | |
container/init: configure interface lo
This enables loopback networking when owning the net namespace.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/init.go')
| -rw-r--r-- | container/init.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/container/init.go b/container/init.go index 53fc5475..5516c422 100644 --- a/container/init.go +++ b/container/init.go @@ -170,6 +170,10 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) { offsetSetup = int(setupFd + 1) } + if !params.HostNet { + k.mustLoopback(msg) + } + // write uid/gid map here so parent does not need to set dumpable if err := k.setDumpable(SUID_DUMP_USER); err != nil { k.fatalf(msg, "cannot set SUID_DUMP_USER: %v", err) |
