From 8cfbc48da5f542fbbdc83fc163d0a7f6bc9dad5c Mon Sep 17 00:00:00 2001 From: Ben Allen Date: Tue, 1 May 2018 16:56:45 -0500 Subject: [PATCH] Skip VLAN interfaces for MAC address matching in findMatch --- netconf/netconf_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netconf/netconf_linux.go b/netconf/netconf_linux.go index 651abf22..1d1de7aa 100644 --- a/netconf/netconf_linux.go +++ b/netconf/netconf_linux.go @@ -114,8 +114,8 @@ func findMatch(link netlink.Link, netCfg *NetworkConfig) (InterfaceConfig, bool) continue } - // Don't match mac address of the bond because it is the same as the slave - if bytes.Compare(haAddr, link.Attrs().HardwareAddr) == 0 && link.Attrs().Name != netConf.Bond { + // 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 && link.Type() != "vlan" { // MAC address match is used over all other matches return netConf, true }