diff options
Diffstat (limited to 'libpod/network/netconflist.go')
-rw-r--r-- | libpod/network/netconflist.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go index d61b96ecb..af25ee59c 100644 --- a/libpod/network/netconflist.go +++ b/libpod/network/netconflist.go @@ -95,6 +95,10 @@ func NewIPAMLocalHostRange(subnet *net.IPNet, ipRange *net.IPNet, gw net.IP) ([] } if gw != nil { hostRange.Gateway = gw.String() + } else { + // Add first ip in subnet as gateway. It is not required + // by cni but should be included because of network inspect. + hostRange.Gateway = CalcGatewayIP(subnet).String() } ranges = append(ranges, hostRange) return ranges, nil |