summaryrefslogtreecommitdiff
path: root/libpod/network/netconflist.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-02-01 14:42:38 -0600
committerbaude <bbaude@redhat.com>2021-02-01 14:42:38 -0600
commite11d8f15e8d7559bc70ebef2dd0125be9d692da5 (patch)
tree93cb63e3a92b39ebb33ceb8aed07e31a283011e9 /libpod/network/netconflist.go
parent20183349fd2c6a9a569c6c79234af48bb5d92ff7 (diff)
downloadpodman-e11d8f15e8d7559bc70ebef2dd0125be9d692da5.tar.gz
podman-e11d8f15e8d7559bc70ebef2dd0125be9d692da5.tar.bz2
podman-e11d8f15e8d7559bc70ebef2dd0125be9d692da5.zip
add macvlan as a supported network driver
instead of using the --macvlan to indicate that you want to make a macvlan network, podman network create now honors the driver name of *macvlan*. Any options to macvlan, like the parent device, should be specified as a -o option. For example, -o parent=eth0. the --macvlan option was marked as deprecated in the man page but is still supported for the duration of 3.0. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/network/netconflist.go')
-rw-r--r--libpod/network/netconflist.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go
index 165a9067b..ca6a4a70b 100644
--- a/libpod/network/netconflist.go
+++ b/libpod/network/netconflist.go
@@ -177,9 +177,13 @@ func NewMacVLANPlugin(device string) MacVLANConfig {
m := MacVLANConfig{
PluginType: "macvlan",
- Master: device,
IPAM: i,
}
+ // CNI is supposed to use the default route if a
+ // parent device is not provided
+ if len(device) > 0 {
+ m.Master = device
+ }
return m
}