update pkg/ip/link_linux.go:SetupVeth to support host-side veth name config.

This commit is contained in:
Koonwah Chen
2019-06-21 11:28:46 -07:00
parent fe60fcddb8
commit c204dbd47c
4 changed files with 17 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ func setupContainerVeth(netns ns.NetNS, ifName string, mtu int, pr *current.Resu
containerInterface := &current.Interface{}
err := netns.Do(func(hostNS ns.NetNS) error {
hostVeth, contVeth0, err := ip.SetupVeth(ifName, mtu, hostNS)
hostVeth, contVeth0, err := ip.SetupVeth(ifName, "", mtu, hostNS)
if err != nil {
return err
}