summaryrefslogtreecommitdiff
path: root/libpod/network/config.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-02-02 13:24:14 -0600
committerbaude <bbaude@redhat.com>2021-02-02 13:24:14 -0600
commitbd0e22ed14ca09a7b656f4603c13aac3a4066968 (patch)
treec2ddd23aa6fcd8900e515b37341332e8e5393f40 /libpod/network/config.go
parentd66a18cb11688060a3ef737dd05758398279f053 (diff)
downloadpodman-bd0e22ed14ca09a7b656f4603c13aac3a4066968.tar.gz
podman-bd0e22ed14ca09a7b656f4603c13aac3a4066968.tar.bz2
podman-bd0e22ed14ca09a7b656f4603c13aac3a4066968.zip
Honor network options for macvlan networks
when creating a macvlan network, we should honor gateway, subnet, and mtu as provided by the user. Fixes: #9167 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/network/config.go')
-rw-r--r--libpod/network/config.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/network/config.go b/libpod/network/config.go
index ce351129e..294e23509 100644
--- a/libpod/network/config.go
+++ b/libpod/network/config.go
@@ -103,7 +103,9 @@ func (p PortMapConfig) Bytes() ([]byte, error) {
// IPAMDHCP describes the ipamdhcp config
type IPAMDHCP struct {
- DHCP string `json:"type"`
+ DHCP string `json:"type"`
+ Routes []IPAMRoute `json:"routes,omitempty"`
+ Ranges [][]IPAMLocalHostRangeConf `json:"ranges,omitempty"`
}
// MacVLANConfig describes the macvlan config
@@ -111,6 +113,7 @@ type MacVLANConfig struct {
PluginType string `json:"type"`
Master string `json:"master"`
IPAM IPAMDHCP `json:"ipam"`
+ MTU int `json:"mtu,omitempty"`
}
// Bytes outputs the configuration as []byte