summaryrefslogtreecommitdiff
path: root/pkg/rootlessport
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-08-24 23:04:25 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-15 20:00:28 +0200
commitb906b9d8581c6fe745509e386c5324d9c76b8801 (patch)
treef901034d8f1c69d8c6c788551c182095743cf38b /pkg/rootlessport
parent85e8fbf7f33717ef6a0d6cf9e2143b52c874c2de (diff)
downloadpodman-b906b9d8581c6fe745509e386c5324d9c76b8801.tar.gz
podman-b906b9d8581c6fe745509e386c5324d9c76b8801.tar.bz2
podman-b906b9d8581c6fe745509e386c5324d9c76b8801.zip
Drop OCICNI dependency
We do not use the ocicni code anymore so let's get rid of it. Only the port struct is used but we can copy this into libpod network types so we can debloat the binary. The next step is to remove the OCICNI port mapping form the container config and use the better PortMapping struct everywhere. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/rootlessport')
-rw-r--r--pkg/rootlessport/rootlessport_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/rootlessport/rootlessport_linux.go b/pkg/rootlessport/rootlessport_linux.go
index 10d135e0b..6c7b8e6d7 100644
--- a/pkg/rootlessport/rootlessport_linux.go
+++ b/pkg/rootlessport/rootlessport_linux.go
@@ -23,8 +23,8 @@ import (
"path/filepath"
"github.com/containernetworking/plugins/pkg/ns"
+ "github.com/containers/podman/v3/libpod/network/types"
"github.com/containers/storage/pkg/reexec"
- "github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
rkport "github.com/rootless-containers/rootlesskit/pkg/port"
rkbuiltin "github.com/rootless-containers/rootlesskit/pkg/port/builtin"
@@ -44,7 +44,7 @@ const (
// Config needs to be provided to the process via stdin as a JSON string.
// stdin needs to be closed after the message has been written.
type Config struct {
- Mappings []ocicni.PortMapping
+ Mappings []types.OCICNIPortMapping
NetNSPath string
ExitFD int
ReadyFD int
@@ -313,7 +313,7 @@ func handler(ctx context.Context, conn io.Reader, pm rkport.Manager) error {
return nil
}
-func exposePorts(pm rkport.Manager, portMappings []ocicni.PortMapping, childIP string) error {
+func exposePorts(pm rkport.Manager, portMappings []types.OCICNIPortMapping, childIP string) error {
ctx := context.TODO()
for _, i := range portMappings {
hostIP := i.HostIP