diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-08-24 23:04:25 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-09-15 20:00:28 +0200 |
commit | b906b9d8581c6fe745509e386c5324d9c76b8801 (patch) | |
tree | f901034d8f1c69d8c6c788551c182095743cf38b /libpod/networking_linux.go | |
parent | 85e8fbf7f33717ef6a0d6cf9e2143b52c874c2de (diff) | |
download | podman-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 'libpod/networking_linux.go')
-rw-r--r-- | libpod/networking_linux.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 8ce4e1896..96b6fb298 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -27,7 +27,6 @@ import ( "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage/pkg/lockfile" - "github.com/cri-o/ocicni/pkg/ocicni" "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -927,7 +926,8 @@ func getContainerNetIO(ctr *Container) (*netlink.LinkStatistics, error) { return nil, nil } err := ns.WithNetNSPath(netNSPath, func(_ ns.NetNS) error { - link, err := netlink.LinkByName(ocicni.DefaultInterfaceName) + // FIXME get the interface from the container netstatus + link, err := netlink.LinkByName("eth0") if err != nil { return err } @@ -1315,7 +1315,7 @@ func (r *Runtime) normalizeNetworkName(nameOrID string) (string, error) { return net.Name, nil } -func ocicniPortsToNetTypesPorts(ports []ocicni.PortMapping) []types.PortMapping { +func ocicniPortsToNetTypesPorts(ports []types.OCICNIPortMapping) []types.PortMapping { newPorts := make([]types.PortMapping, 0, len(ports)) for _, port := range ports { newPorts = append(newPorts, types.PortMapping{ |