From 4febe557692aeec8ca9d9b9cdc732772ba7d5876 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 20 Oct 2021 15:55:22 +0200 Subject: netavark IPAM assignment Add a new boltdb to handle IPAM assignment. The db structure is the following: Each network has their own bucket with the network name as bucket key. Inside the network bucket there is an ID bucket which maps the container ID (key) to a json array of ip addresses (value). The network bucket also has a bucket for each subnet, the subnet is used as key. Inside the subnet bucket an ip is used as key and the container ID as value. The db should be stored on a tmpfs to ensure we always have a clean state after a reboot. Signed-off-by: Paul Holzinger --- libpod/network/internal/util/ip.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'libpod/network/internal/util/ip.go') diff --git a/libpod/network/internal/util/ip.go b/libpod/network/internal/util/ip.go index ee759fd65..7fe35d3d4 100644 --- a/libpod/network/internal/util/ip.go +++ b/libpod/network/internal/util/ip.go @@ -68,11 +68,3 @@ func getRandomIPv6Subnet() (net.IPNet, error) { ip = append(ip, make([]byte, 8)...) return net.IPNet{IP: ip, Mask: net.CIDRMask(64, 128)}, nil } - -// NormalizeIP will transform the given ip to the 4 byte len ipv4 if possible -func NormalizeIP(ip *net.IP) { - ipv4 := ip.To4() - if ipv4 != nil { - *ip = ipv4 - } -} -- cgit v1.2.3-54-g00ecf