Clean up outdated slirp4netns references in comments

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar 2026-02-11 16:45:39 +05:30
parent 3f85c7df43
commit 9ff3f4cb1e
No known key found for this signature in database
GPG key ID: 1C1EDD7CC7C3A0DD
7 changed files with 7 additions and 10 deletions

View file

@ -229,7 +229,7 @@ outer:
unix.Dup2(int(f.Fd()), 2) //nolint:errcheck unix.Dup2(int(f.Fd()), 2) //nolint:errcheck
f.Close() f.Close()
} }
// write and close ReadyFD (convention is same as slirp4netns --ready-fd) // write and close ReadyFD to signal readiness
if _, err := readyW.Write([]byte("1")); err != nil { if _, err := readyW.Write([]byte("1")); err != nil {
return err return err
} }

View file

@ -47,7 +47,6 @@ case $1 in
passt passt
podman podman
skopeo skopeo
slirp4netns
) )
case $OS_RELEASE_ID in case $OS_RELEASE_ID in
fedora) fedora)

View file

@ -944,8 +944,7 @@ func (c *Container) Sync() error {
// It is mostly intended to be used in cases where the system firewall has been // It is mostly intended to be used in cases where the system firewall has been
// reloaded, and existing rules have been wiped out. It is expected that some // reloaded, and existing rules have been wiped out. It is expected that some
// downtime will result, as the rules are destroyed as part of this process. // downtime will result, as the rules are destroyed as part of this process.
// At present, this only works on root containers; it may be expanded to restart // At present, this only works on containers with bridge networking.
// slirp4netns in the future to work with rootless containers as well.
// Requires that the container must be running or created. // Requires that the container must be running or created.
func (c *Container) ReloadNetwork() error { func (c *Container) ReloadNetwork() error {
if !c.batched { if !c.batched {

View file

@ -2227,7 +2227,7 @@ func (c *Container) addResolvConf() error {
// add the nameservers from the networks status // add the nameservers from the networks status
nameservers = networkNameServers nameservers = networkNameServers
} else { } else {
// pasta and slirp4netns have a built in DNS forwarder. // pasta has a built in DNS forwarder.
nameservers = c.addSpecialDNS(nameservers) nameservers = c.addSpecialDNS(nameservers)
} }
} }

View file

@ -556,7 +556,7 @@ func (c *Container) setCgroupsPath(g *generate.Generator) error {
return nil return nil
} }
// addSpecialDNS adds special dns servers for slirp4netns and pasta // addSpecialDNS adds special dns servers for pasta
func (c *Container) addSpecialDNS(nameservers []string) []string { func (c *Container) addSpecialDNS(nameservers []string) []string {
switch { switch {
case c.config.NetMode.IsBridge(): case c.config.NetMode.IsBridge():

View file

@ -131,8 +131,7 @@ func isBridgeNetMode(n namespaces.NetworkMode) error {
// This is mainly used when a reload of firewall rules wipes out existing // This is mainly used when a reload of firewall rules wipes out existing
// firewall configuration. // firewall configuration.
// Efforts will be made to preserve MAC and IP addresses. // Efforts will be made to preserve MAC and IP addresses.
// Only works on containers with bridge networking at present, though in the future we could // Only works on containers with bridge networking.
// extend this to stop + restart slirp4netns
func (r *Runtime) reloadContainerNetwork(ctr *Container) (map[string]types.StatusBlock, error) { func (r *Runtime) reloadContainerNetwork(ctr *Container) (map[string]types.StatusBlock, error) {
if ctr.state.NetNS == "" { if ctr.state.NetNS == "" {
return nil, fmt.Errorf("container %s network is not configured, refusing to reload: %w", ctr.ID(), define.ErrCtrStateInvalid) return nil, fmt.Errorf("container %s network is not configured, refusing to reload: %w", ctr.ID(), define.ErrCtrStateInvalid)
@ -256,7 +255,7 @@ func (c *Container) getContainerNetworkInfo() (*define.InspectNetworkSettings, e
settings.SandboxKey = c.state.NetNS settings.SandboxKey = c.state.NetNS
netStatus := c.getNetworkStatus() netStatus := c.getNetworkStatus()
// If this is empty, we're probably slirp4netns // If this is empty, we're probably using pasta
if len(netStatus) == 0 { if len(netStatus) == 0 {
return settings, nil return settings, nil
} }

View file

@ -299,7 +299,7 @@ func cliOpts(cc handlers.CreateContainerConfig, rtc *config.Config) (*entities.C
} }
} }
// special case for NetworkMode, the podman default is slirp4netns for // special case for NetworkMode, the podman default is pasta for
// rootless but for better docker compat we want bridge. Do this only if // rootless but for better docker compat we want bridge. Do this only if
// the default config in containers.conf wasn't overridden to use another // the default config in containers.conf wasn't overridden to use another
// value than the default "private" one. // value than the default "private" one.