mirror of
https://github.com/rancher/os.git
synced 2025-06-29 00:06:49 +00:00
Skip VLAN interfaces for MAC address matching in findMatch
This commit is contained in:
parent
41a3330d89
commit
8cfbc48da5
@ -114,8 +114,8 @@ func findMatch(link netlink.Link, netCfg *NetworkConfig) (InterfaceConfig, bool)
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't match mac address of the bond because it is the same as the slave
|
// Don't match mac address of a bond or VLAN interface because it is the same address as the slave or parent.
|
||||||
if bytes.Compare(haAddr, link.Attrs().HardwareAddr) == 0 && link.Attrs().Name != netConf.Bond {
|
if bytes.Compare(haAddr, link.Attrs().HardwareAddr) == 0 && link.Attrs().Name != netConf.Bond && link.Type() != "vlan" {
|
||||||
// MAC address match is used over all other matches
|
// MAC address match is used over all other matches
|
||||||
return netConf, true
|
return netConf, true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user