Files
podman/libpod/networking_pasta_linux.go
Paul Holzinger c98538db7d libpod: use pasta Setup() over Setup2()
Setup2() calls Setup() so they are both the same thing, the idea was to
keep Setup2() around in c/common for a bit to avoid breaking changes
during our regular vendoring. Now just use Setup() so we can get rid of
Setup2() in c/common.

a7415c3eab

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-30 13:35:56 +01:00

27 lines
633 B
Go

//go:build !remote
// SPDX-License-Identifier: Apache-2.0
//
// networking_pasta_linux.go - Start pasta(1) for user-mode connectivity
//
// Copyright (c) 2022 Red Hat GmbH
// Author: Stefano Brivio <sbrivio@redhat.com>
package libpod
import "github.com/containers/common/libnetwork/pasta"
func (r *Runtime) setupPasta(ctr *Container, netns string) error {
res, err := pasta.Setup(&pasta.SetupOptions{
Config: r.config,
Netns: netns,
Ports: ctr.convertPortMappings(),
ExtraOptions: ctr.config.NetworkOptions[pasta.BinaryName],
})
if err != nil {
return err
}
ctr.pastaResult = res
return nil
}