Skip to content

Commit

Permalink
undoing cni part changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kmurudi committed Dec 19, 2023
1 parent 2dfef9a commit e585b50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cni/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,16 +608,15 @@ func (plugin *NetPlugin) createNetworkInternal(
ipamAddResult.hostSubnetPrefix.IP = ipamAddResult.hostSubnetPrefix.IP.Mask(ipamAddResult.hostSubnetPrefix.Mask)
ipamAddConfig.nwCfg.IPAM.Subnet = ipamAddResult.hostSubnetPrefix.String()
// Find the master interface.
//masterIfName := plugin.findMasterInterface(ipamAddConfig.nwCfg, &ipamAddResult.hostSubnetPrefix)
masterIfName := plugin.findMasterInterface(ipamAddConfig.nwCfg, &ipamAddResult.secondaryInterfacesInfo[0].IPConfigs[0].Address)
masterIfName := plugin.findMasterInterface(ipamAddConfig.nwCfg, &ipamAddResult.hostSubnetPrefix)
if masterIfName == "" {
err := plugin.Errorf("Failed to find the master interface")
return nwInfo, err
}
logger.Info("Found master interface", zap.String("ifname", masterIfName))

// Add the master as an external interface.
err := plugin.nm.AddExternalInterface(masterIfName, ipamAddResult.secondaryInterfacesInfo[0].IPConfigs[0].Address.String())
err := plugin.nm.AddExternalInterface(masterIfName, ipamAddResult.hostSubnetPrefix.String())
if err != nil {
err = plugin.Errorf("Failed to add external interface: %v", err)
return nwInfo, err
Expand Down

0 comments on commit e585b50

Please sign in to comment.