MACAddress -> MacAddress
Docker-DCO-1.1-Signed-off-by: Malte Janduda <mail@janduda.net> (github: MalteJ)
This commit is contained in:
parent
bf54bdfd7f
commit
d804790e8d
|
@ -260,7 +260,7 @@ func TestCreateBridgeWithMac(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSetMACAddress(t *testing.T) {
|
||||
func TestSetMacAddress(t *testing.T) {
|
||||
if testing.Short() {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ type Network struct {
|
|||
// Prefix for the veth interfaces.
|
||||
VethPrefix string `json:"veth_prefix,omitempty"`
|
||||
|
||||
// MACAddress contains the MAC address to set on the network interface
|
||||
MACAddress string `json:"mac_address,omitempty"`
|
||||
// MacAddress contains the MAC address to set on the network interface
|
||||
MacAddress string `json:"mac_address,omitempty"`
|
||||
|
||||
// Address contains the IPv4 and mask to set on the network interface
|
||||
Address string `json:"address,omitempty"`
|
||||
|
|
|
@ -60,8 +60,8 @@ func (v *Veth) Initialize(config *Network, networkState *NetworkState) error {
|
|||
if err := ChangeInterfaceName(vethChild, defaultDevice); err != nil {
|
||||
return fmt.Errorf("change %s to %s %s", vethChild, defaultDevice, err)
|
||||
}
|
||||
if config.MACAddress != "" {
|
||||
if err := SetInterfaceMac(defaultDevice, config.MACAddress); err != nil {
|
||||
if config.MacAddress != "" {
|
||||
if err := SetInterfaceMac(defaultDevice, config.MacAddress); err != nil {
|
||||
return fmt.Errorf("set %s mac %s", defaultDevice, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue